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

Re:这是为什么啊,两个一样的,一个ac,一个WA??

Posted by xiaobai1 at 2007-08-18 21:35:12 on Problem 1552
In Reply To:这是为什么啊,两个一样的,一个ac,一个WA?? Posted by:xtu723 at 2007-08-12 16:11:50
> 		sort(s,s+i-1);
> //		 printf("s[i-1]===%d\n",s[i-1]);
> 		num=0;
> 		for(j=1;j<i;j++)
> 		{
> 			for(k=0;k<j;k++)
> 				if(s[j]==s[k]*2)  num++;
> 		}
> 上面是排序之后找,WA
> 		num=0;
> 		for(j=0;j<i;j++)
> 		{
> 			for(k=0;k<i;k++)
> 				if(s[j]==s[k]*2)  num++;
> 		}
> 上面不排序直接找,AC
> 两个有什么不同?

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