結果
| 問題 | No.69 文字を自由に並び替え |
| コンテスト | |
| ユーザー |
babumideep
|
| 提出日時 | 2020-08-02 20:42:51 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 495 bytes |
| 記録 | |
| コンパイル時間 | 1,186 ms |
| コンパイル使用メモリ | 211,176 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-12 00:16:43 |
| 合計ジャッジ時間 | 2,209 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
babumideep