| ||||||||||
| 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 | |||||||||
判断连续两个__时注意一下~建议for(i=1;i<n;i++)
{
if(a[i]=='_'&&a[i-1]=='_')
...
}
不要用
for(i=0;i+1<n;i++)
{
if(a[i]=='_'&&a[i+1]=='_')
...
}
因为i+1<n很可能影响到for语句里面的其他if语句,i只能取到n-2;
就因为这个我wa了n次,惭愧啊!
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator