結果
| 問題 | No.69 文字を自由に並び替え | 
| コンテスト | |
| ユーザー |  alpha_virginis | 
| 提出日時 | 2015-05-24 15:32:25 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 625 bytes | 
| コンパイル時間 | 1,583 ms | 
| コンパイル使用メモリ | 158,460 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-14 05:56:32 | 
| 合計ジャッジ時間 | 2,076 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 15 | 
ソースコード
#include <bits/stdc++.h>
inline long nextInt(void) {
  long temp;
  std::cin >> temp;
  return temp;
}
int main() {
  int c1[256] = {};
  int c2[256] = {};
  std::string str1;
  std::string str2;
  bool b = true;
  std::cin >> str1;
  std::cin >> str2;
  for(int i = 0; i < str1.size(); ++i) {
    ++c1[str1[i]];
  }
  for(int i = 0; i < str2.size(); ++i) {
    ++c2[str2[i]];
  }
  b = true;
  for(int i = 0; i < 256; ++i) {
    if( c1[i] != c2[i] ) {
      b = false;
      break;
    }
  }
  if( b ) {
    std::cout << "YES" << std::endl;
  }
  else {
    std::cout << "NO" << std::endl;
  }
  
    
  return 0;
}
            
            
            
        