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:和标程几乎完全一样的程序,却WA,牛人来看看

Posted by yxyx1590 at 2006-04-27 12:12:39 on Problem 1002
In Reply To:和标程几乎完全一样的程序,却WA,牛人来看看 Posted by:qwert123 at 2006-04-27 11:07:47
	for(i=0;i<ins;)//!!!!错误在这!!!!第1层循环不能i++,因为后边已经有i=j,i++会跳过一个
	{
		count=1;
		for(j=i+1;j<ins && std[j]==std[i];j++)
			count++;
		if (count>1)
		{
			printf("%03d-%04d %d\n",std[i]/10000,std[i]%10000,count);
			total=1;
		}
		i=j;
	}

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