Advertisement
noshin98

uva 11942

Sep 8th, 2016
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long long n,i,a,b,c,d,e,f,g,h,k,j;
  5.     while(scanf("%lld",&n)==1)
  6.     {
  7.         printf("Lumberjacks:\n");
  8.         for(i=1;i<=n;i++)
  9.         {
  10.  
  11.             scanf("%lld%lld%lld%lld%lld%lld%lld%lld%lld%lld",&a,&b,&c,&d,&e,&f,&g,&h,&k,&j);
  12.             if(a>b&&b>c&&c>d&&d>e&&e>f&&f>g&&g>h&&h>k&&k>j)
  13.                 printf("Ordered\n");
  14.             else if(a<b&&b<c&&c<d&&d<e&&e<f&&f<g&&g<h&&h<k&&k<j)
  15.                 printf("Ordered\n");
  16.             else
  17.                 printf("Unordered\n");
  18.         }
  19.  
  20.  
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement