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 |
Re:和标程几乎完全一样的程序,却WA,牛人来看看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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator