結果
| 問題 | No.69 文字を自由に並び替え |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-30 09:00:10 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 610 bytes |
| 記録 | |
| コンパイル時間 | 1,073 ms |
| コンパイル使用メモリ | 85,324 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-30 09:00:12 |
| 合計ジャッジ時間 | 1,855 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 1 |
ソースコード
#include <iostream>
#include <math.h>
#include <algorithm>
#include <map>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, d, n) for (int i = d; i < (int)(n); i++)
#define forEach(arr) for (auto& it:arr)
int main(void){
string a,b;
cin >> a >> b;
int al = a.length();
map<char,bool>m;
rep(i,al) {
m[a[i]] = false;
}
rep(i,al) {
m[b[i]] = true;
}
rep(i,al) {
if(!m[a[i]]) {
cout << "NO";
return 0;
}
}
cout << "YES";
}