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 |
Re:大牛们帮帮忙啊,为什么是WAIn Reply To:大牛们帮帮忙啊,为什么是WA Posted by:xiaorong at 2010-12-09 00:02:23 > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > #include <cstdlib> > #include<algorithm> > > using namespace std; > int main() > { > char s[100],t[100],l[100]; > int i,k; > scanf("%s%s",s,t); > k=strlen(s); > for(i=0;i<k;i++) > if(s[i]=='A') l[i]='Z'; > else l[i]=s[i]-1; > l[i]='\0'; > sort(t,t+k); > sort(l,l+k); > for(i=0;i<k;i) > if(t[i]==l[i++]); > else break; > if(i=k) > printf("YES\n"); > else printf("NO\n"); > system("pause"); > return 0; > } > 显然题意理解错误 AB CD YES Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator