Promi_38

cf 807A

Jan 13th, 2021
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n, i;
  6.     scanf("%d", &n);
  7.    
  8.     int a[n], b[n];
  9.     for(i = 0; i < n; i++) scanf("%d %d", &a[i], &b[i]);
  10.    
  11.     for(i = 0; i < n; i++)
  12.     {
  13.         if(a[i] != b[i])
  14.         {
  15.             printf("rated\n");
  16.             return 0;
  17.         }
  18.     }
  19.    
  20.     for(i = 0; i < n-1; i++)
  21.     {
  22.         if(a[i] < a[i+1])
  23.         {
  24.             printf("unrated\n");
  25.             return 0;
  26.         }
  27.     }
  28.     printf("maybe\n");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment