Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3), problem: (A) Is it rated? Solution In C/C++

#include <iostream>
using namespace std;
int n,i,a,a1,b,f;
string s[3]={“maybe”,”unrated”,”rated”};
int main(){
cin>>n;
for(;i<n;i++){
cin>>a>>b;
if(a!=b){f=2;break;}
if(i>0&&a>a1)f=1;
a1=a;
}
cout<<s[f];
}

(Visited 19 times, 1 visits today)

About the Author:

Leave A Comment