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

Re:为什么会错啊?代码很简单...

Posted by zjp at 2009-07-16 14:37:47 on Problem 2159
In Reply To:为什么会错啊?代码很简单... Posted by:980616701 at 2009-06-29 18:15:08
> #include<iostream>
> #include<algorithm>
> #include<string.h>
> using namespace std;
> int main()
> {
> 	char a[101],b[101];
> 	while(scanf("%s%s",a,b))
> 	{
> 		int i=0;
> 		for(i=0;i<strlen(b);i++)
> 		{
> 			b[i]+=1;
> 		}
> 		sort(a,a+strlen(a));
> 		sort(b,b+strlen(b));
> 		i=0;
> 		if(strcmp(a,b)==0)printf("YES\n");else printf("NO\n");
> 	}
> 	return 0;
> }

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