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 |
求救~~为什么总是OLE啊#include<stdio.h> #include<math.h> #include<string.h> int main() { int i; int n[3000]; int groups,before,next,temp,flag; while(1) { scanf("%d",&groups); if(groups==0) break; memset(n, 0, sizeof(n)); flag=1; scanf("%d",&before); for(i=1;i<groups;i++) { scanf("%d",&next); temp=abs(next-before); n[temp]++; before=next; } for(i=1;i<groups;i++) { if(n[i]==0) { flag=0; break; } } if(flag==1) printf("Jolly\n"); else printf("Not jolly\n"); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator