#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
int test,fnum,allnum;
bool up,down;
cin>>test;
cout<<"Lumberjacks:"<<endl;
while(test--)
{
up=down=false;
cin>>fnum;
for(int i=0;i<9;i++)
{
cin>>allnum;
if(fnum<allnum)
up=true;
else
down=true;
fnum=allnum;
}
if(up&&down)
{
cout<<"Unordered"<<endl;
}
else{
cout<<"Ordered"<<endl;
}
}
return 0;
}
Monday, 10 April 2017
UVA 11942 solve
Subscribe to:
Post Comments (Atom)
-
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int a,b,s; while(1) { scanf(...

No comments:
Post a Comment