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 980616701 at 2009-06-29 18:15:08 on Problem 2159
#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