結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
|
提出日時 | 2018-07-24 16:03:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 468 bytes |
コンパイル時間 | 478 ms |
コンパイル使用メモリ | 55,884 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 07:07:12 |
合計ジャッジ時間 | 1,105 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
//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]=' '; break; } } } if(A.length()==B.length() && cnt==A.length())cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }