結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
|
提出日時 | 2018-07-24 15:52:33 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 445 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 55,140 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-23 05:50:11 |
合計ジャッジ時間 | 1,108 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 1 |
ソースコード
//No.69 文字を自由に並び替え #include<string> #include<iostream> using namespace std; int main(){ string A,B; cin>>A>>B; int cnt=0; for(int i=0;i<A.length();i++){ for(int j=0;j<B.length();j++){ if(A[i]==B[j]){ cnt++; B[j]='0'; } } } if(A.length()==B.length() && cnt==A.length())cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }