結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
|
提出日時 | 2018-12-22 04:42:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 1,629 ms |
コンパイル使用メモリ | 168,080 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 07:17:02 |
合計ジャッジ時間 | 2,252 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); string a, b; cin >> a >> b; vector<int> x(26), y(26); for(int i = 0; i < a.size(); i++) { x[a[i] - 97]++; y[b[i] - 97]++; } for(int i = 0; i < 26; i++) { if(x[i] != y[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }