結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2019-02-21 19:20:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 55,320 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 07:20:33 |
合計ジャッジ時間 | 1,144 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include<iostream>#include<string>using namespace std;int main() {string a, b;cin >> a >> b;int c = 0;for (int i = 0; i < a.length(); i++) {for (int j = 0; j < a.length(); j++) {if (a[i] == b[j]) {c++;b[j] = 'A';break;}}}if (c == a.length()) {cout << "YES" << endl;}else {cout << "NO" << endl;}}