結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
|
提出日時 | 2015-11-28 22:12:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 391 bytes |
コンパイル時間 | 656 ms |
コンパイル使用メモリ | 60,148 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-14 06:07:25 |
合計ジャッジ時間 | 1,268 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <iostream>#include <vector>using namespace std;int main(){string a,b;int len;vector<int> alpha(26, 0);cin >> a >> b;len=a.length();for(int i=0; i<len; ++i){++alpha[a.at(i)-'a'];--alpha[b.at(i)-'a'];}for(int i=0; i<26; ++i){if(alpha[i]!=0){cout << "NO" << endl;return 0;}}cout << "YES" << endl;return 0;}