Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么提交就是不对 本地通过#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator