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 |
I wanted to test if the given integer n was over 1000I wanted to test if the given integer n was over 1000, so I submited this code and I got TLE. #include <string> int n,i; char s1[100]; char s2[100]; char s3[100]; int main() { while(scanf("%d%s%s" , &n , &s1 , &s2) != EOF) { if(n > 1000) { while(1); } for(i=1;i<=n;i++) scanf("%s",&s3); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator