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 |
Re:日了 Output Limit Exceeded了 加个EOF就好使了In Reply To:日了 Output Limit Exceeded了 加个EOF就好使了 Posted by:CJQ2011 at 2012-08-09 11:10:06 > 哥们看下我的行吗 #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||groups==EOF) 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