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 |
WA。。。。编译器都没问题。。。怎么提交就出错呢? (附代码)#include<iostream> #include<string> using namespace std; int main(){ string str=""; string cmp=""; int count1[26]={0},count2[26]={0}; int i=0; int count[26]={0}; cin>>cmp>>str; int l=cmp.size(); for(i=0;i<l;i++){ count1[str[i]-'A']++; count2[cmp[i]-'A']++; } for(i=0;i<26;i++){ count[count1[i]]++; count[count2[i]]--; } for(i=0;i<l;i++){ if(count[i]!=0){ cout<<"NO"<<endl; return 0; } } cout<<"YES"<<endl; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator