Search found 1 match

by meheraj
Fri Jun 19, 2009 10:01 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 153280

Re: 10038 - Jolly Jumpers WA...why...please tell me..

:o
#include<iostream>
using namespace std;
int main()
{
int i,j;
long arr[3001],d[3001],n;
while (cin>>n&&n>0)
{
for (i=0;i<n;i++)
cin>>arr ;
for (i=0;i<n-1;i++)
{
d =abs(arr[i+1]-arr );
if (d >n-1)break;
}
if (d >n-1)
cout<<"Not jolly"<<endl;
else
//cout<<"Jolly"<<endl;
{
for (i=0 ...

Go to advanced search