結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2020-08-02 20:42:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 495 bytes |
コンパイル時間 | 2,989 ms |
コンパイル使用メモリ | 193,860 KB |
最終ジャッジ日時 | 2025-01-12 13:31:16 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> #define ll long long #define pi (acos(-1)) using namespace std; /*todos * prime num gen * for macro * */ int main() { std::string a, b; cin >> a >> b; vector<int> m(1000, 0), n(1000, 0); for (auto &c : a) { m[c]++; } for (auto &c : b) { n[c]++; } for (int i = 0; i != 1000; ++i) { if (m[i] != n[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << std::endl; return 0; }