#include<stdio.h>
int main(void)
{
int n,a[10];
scanf("%d",&n);
puts("Lumberjacks:");
while(n--){
int i;
for(i=0;i<10;i++)
scanf("%d",&a[i]);
for(i=0;i<8;i++)
if(a[i]<a[i+1]&&a[i+1]>a[i+2]||a[i]>a[i+1]&&a[i+1]<a[i+2])
goto failure;
puts("Ordered");
if(0)
failure:puts("Unordered");
}
return 0;}
11942 - Lumberjack Sequencing
最新推荐文章于 2022-03-24 23:50:52 发布