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

I wanted to test if the given integer n was over 1000

Posted by Dynamical at 2008-02-01 01:54:56 on Problem 3489
I 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:
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