結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
|
提出日時 | 2020-10-09 05:44:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 5,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 476 ms |
コンパイル使用メモリ | 68,588 KB |
最終ジャッジ日時 | 2025-01-15 03:35:11 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include<iostream> #include<string> using namespace std; int main(){ string s,y,z; cin >> s; cin >> y; z = s; for(int i = 0; i < s.length(); i++) for(int j = 0; j < s.length(); j++) if(s.at(i) == y.at(j)&&z.at(j)!=y.at(j)){ z[j] = y[j]; break;} if(z==y) cout << "YES" << endl; else cout << "NO" <<endl; return 0; }