-
Notifications
You must be signed in to change notification settings - Fork 0
/
p11942.cpp
41 lines (39 loc) · 865 Bytes
/
p11942.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
#include <cstdio>
using namespace std;
#define sf scanf
#define pf printf
int main()
{
int a[10], i, j, t, flag;
sf("%d", &t);
for(i=0; i<t; i++) {
for(j=0; j<10; j++) {
sf("%d", &a[j]);
}
flag = 0;
if(a[0]>a[9]) {
for(j=0; j<9; j++) {
if(a[j]<a[j+1]) {
flag = 1;
break;
}
}
}else if(a[0]<a[9]) {
for(j=0; j<9; j++) {
if(a[j]>a[j+1]) {
flag = 1;
break;
}
}
}
if(i==0) {
pf("Lumberjacks:\n");
}
if(flag==1) {
pf("Unordered\n");
}else {
pf("Ordered\n");
}
}
}