Problem - A - Codeforces
#include<bits/stdc++.h>
using namespace std;
void solve(){
int a,b,c;
cin >> a>> b >> c;
if(a < b && b < c) cout <<"STAIR" << endl;
else if(a < b && c < b) cout << "PEAK" << endl;
else cout << "NONE" << endl;
}
int main()
{
int t;
cin >> t;
while(t--){
solve();
}
}
Problem - B - Codeforces
#include<bits/stdc++.h>
using namespace std;
void solve(){
int n;
cin >> n;
for(int i = 1;i <= n;i++){
string s = "";
for(int j= 1;j <= n;j++){
if(i % 2 == 1){
if(j%2 == 1) s+="##";
else s+="..";
} else {
if(j%2 == 1) s+="..";
else s+="##";
}
}
cout << s <<endl;
cout << s << endl;
}
}
int main()
{
int t;
cin >> t;
while(t--){
solve();
}
}
Pr