| ||||||||||
| 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<0换成j=0xffffffff 就对了呢?这是判断逆置是是否相等的代码
while(i<strlen(s1)&&j>=0)
{
if(s1[i]==s2[j])
{
i++;
j--;
}
else i++;
}
if(j==0xffffffff) flag=1;
我开始用if(j<0) flag=1;
换成if(j==0xffffffff) flag=1;就对了 不懂,只是为什么啊 大侠指点下吧
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator