結果
| 問題 | No.69 文字を自由に並び替え |
| コンテスト | |
| ユーザー |
AQUA16573837
|
| 提出日時 | 2018-03-13 01:51:41 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 422 bytes |
| 記録 | |
| コンパイル時間 | 491 ms |
| コンパイル使用メモリ | 57,456 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-25 00:58:48 |
| 合計ジャッジ時間 | 3,667 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <stdio.h>
#include <algorithm>
#include <deque>
using namespace std;
using ll = long long;
//69
int main() {
char s[11];
int count[26] = { 0 };
scanf("%s", s);
for (int i = 0; s[i] != 0; i++)
count[s[i] - 'a']++;
scanf("%s", s);
for (int i = 0; s[i] != 0; i++)
count[s[i] - 'a']--;
int match = 0;
for (int i = 0; i < 26; i++)
if (count[i] != 0)
match++;
printf("%s\n", match ? "NO" : "YES");
}
AQUA16573837