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

判断长度差一的字符串能否转化为另一个。

Posted by dooder_daodao at 2011-07-21 13:17:13 on Problem 1035
int Near(char *s,char *t,int l)
{//lens - lent == 1 ; s[] to t[]
	int c,i;
	for(i=c=0;i<l&&c<2;){
		if(s[i+c]!=t[i])
			c++;
		else i++;
	}
	return 2-c;
}

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