結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
![]() |
提出日時 | 2018-09-08 19:39:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 1,673 ms |
コンパイル使用メモリ | 169,656 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 07:09:39 |
合計ジャッジ時間 | 2,338 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define rep(i,n) for(int i=0;i<(n);++i) int main(){ cin.tie(0); ios::sync_with_stdio(false); string s,t;cin >> s >> t; vector<int> a(26); vector<int> b(26); for(int i=0;i<s.size();++i){ a.at(s.at(i)-'a')++; b.at(t.at(i)-'a')++; } bool ans=true; for(int i=0;i<26;++i){ if(a.at(i)!=b.at(i)) ans=false; } if(ans) cout << "YES" << endl; else cout << "NO" << endl; }