| ||||||||||
| 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 | |||||||||
j没有还原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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator