結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
![]() |
提出日時 | 2016-05-05 11:47:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 656 bytes |
コンパイル時間 | 699 ms |
コンパイル使用メモリ | 86,244 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 06:14:13 |
合計ジャッジ時間 | 1,312 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <algorithm> #include <numeric> #include <string> #include <vector> #include <iostream> #include <queue> #include <utility> #include <cmath> #include <map> #include <unordered_map> #include <functional> #include <fstream> using namespace std; using ull = unsigned long long; int main() { string A,B; cin >> A >> B; for(int i =0; i < A.size(); ++i) { for(int j = 0; j < B.size(); ++j) { if(A.at(i) == B.at(j)) { B.erase(j,1); break; } } } if(B.size() == 0) cout << "YES" << endl; else cout << "NO" << endl; }