https://i0.wp.com/eblogarithm.com/wp-content/uploads/2017/07/Codeforces-Round-412-rated-Div-2-base-on-VK-Cup-2017-Round-3-problem-A-Is-it-rated-Solution-In-CC1.png?fit=640%2C360

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 15 times, 1 visits today)



There are no comments

Add yours

Leave a Reply

%d bloggers like this: