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

j没有还原

Posted by zhoubo at 2007-07-23 20:16:38 on Problem 1028
In Reply To:我觉的我的方法比大家简单多了,提交却是WA,有那位高手能指点一下吗? Posted by:adam123 at 2007-07-05 19:26:10
for(j=i+1;j<102;j++)
*a[j]=0;
这里j到数组最后了,没有还原回来。
不如用j=i;
然后把forward的代码改成:
          i++;
	if(i>j)
	{
		i--;
		cout<<"Ignored\n";
	}
	else cout<<a[i]<<'\n';


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