Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么提交就是不对 本地通过

Posted by gudujianke2001 at 2009-08-06 17:33:04 on Problem 2575
#include<iostream>
#include<math.h>
#include<string>
using namespace std;
const int MaxLenth  =3000;
int main()
{
	int Num[MaxLenth];
	int i,j,k;
	string Display[1];
	string dis;
	while(true)
	{
		i = j = k = 0;
		do
		{
			cin>>Num[i];
			i++;
		}while(i <= Num[0]);	
		for(j = 1 ;j < i - 2  ;j++)
		{	
			if(abs(Num[j] - Num[j+1])  -  abs(Num[j+1] - Num[j+2])== 1)
			{
				Display[0] = "Jolly";
			}
			else
				Display[0] = "Not jolly";	
		}	
		cout<<Display[0]<<endl ;
		Display[0] = "";	
	}
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator