結果
| 問題 | No.69 文字を自由に並び替え |
| コンテスト | |
| ユーザー |
marinebox
|
| 提出日時 | 2020-11-22 23:22:19 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 509µs | |
| コード長 | 508 bytes |
| 記録 | |
| コンパイル時間 | 1,003 ms |
| コンパイル使用メモリ | 189,328 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-24 04:52:00 |
| 合計ジャッジ時間 | 2,134 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string a, b;
cin >> a >> b;
map<int, int> alphabetA, alphabetB;
for(auto c : a){
int tmp = c - 'a';
alphabetA[tmp]++;
}
for(auto c : b){
int tmp = c - 'a';
alphabetB[tmp]++;
}
const string yes = "YES";
const string no = "NO";
string ans = yes;
for(int i = 0; i < 26; i++){
if(alphabetA[i] != alphabetB[i]) ans = no;
}
cout << ans << endl;
return 0;
}
marinebox