AC日记——Is it rated? codeforces 807a

Is it rated?

 

思路:

  水题;

 

代码:

#include <cstdio>
#include <cstring>

using namespace std;

int n,a[1001],b[1001],last=5000;

int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d",&a[i],&b[i]);
        if(a[i]!=b[i])
        {
            printf("rated");
            return 0;
        }
    }
    for(int i=2;i<=n;i++)
    {
        if(a[i]>a[i-1])
        {
            printf("unrated");
            return 0;
        }
    }
    printf("maybe");
    return 0;
}

 

posted @ 2017-05-11 18:26  IIIIIIIIIU  阅读(280)  评论(0编辑  收藏  举报