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<0换成j=0xffffffff 就对了呢?

Posted by yamina at 2009-07-26 15:05:05
这是判断逆置是是否相等的代码
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:
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