結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2017-08-07 21:13:35 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 421 bytes |
コンパイル時間 | 600 ms |
コンパイル使用メモリ | 65,768 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 06:42:53 |
合計ジャッジ時間 | 1,223 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { string a,b; vector<char> v,w; cin >> a >> b; int c = a.size(); for (int i = 0; i < c; i++) { v.push_back(a[i]); w.push_back(b[i]); } sort(v.begin(),v.end()); sort(w.begin(),w.end()); if (v == w) { cout << "YES" << "\n"; }else{ cout << "NO" << "\n"; } return 0; }