Page 1 of 1

11942 - Lumberjack Sequencing

Posted: Thu Sep 11, 2014 1:15 am
by brianfry713
Use this thread to discuss this problem.

Re: 11942 - Lumberjack Sequencing

Posted: Mon Mar 26, 2018 8:21 pm
by EMON
#include<iostream>
using namespace std;
int main()
{
int N,i,j;
cin>>N;
cout<<"Lumberjacks:"<<endl;
if(N>0 && N<20)
{
for(i=1;i<=N;i++)
{
int arr[10];
for(j=0;j<10;j++)
{
cin>>arr[j];
}
if((arr[0]<arr[1] && arr[1]<arr[2] && arr[2]<arr[3] && arr[3]<arr[4] && arr[4]<arr[5])||(arr[0]>arr[1] && arr[1]>arr[2] && arr[2]>arr[3] && arr[3]>arr[4] && arr[4]>arr[5]))
{
cout<<"Ordered"<<endl;
}
else
{
cout<<"Unordered"<<endl;
}
}
}
}


what is the problem here?