結果
| 問題 | No.69 文字を自由に並び替え | 
| コンテスト | |
| ユーザー |  LV3zJigVW57oPGy | 
| 提出日時 | 2022-11-09 11:33:48 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 602 bytes | 
| コンパイル時間 | 1,563 ms | 
| コンパイル使用メモリ | 158,388 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-22 17:41:42 | 
| 合計ジャッジ時間 | 1,893 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 15 | 
ソースコード
#include <bits/stdc++.h> 
using namespace std;
#include <ios>
#include <iomanip>
#include <iostream>
#include <string>
#include <algorithm>
int main(){
  string a, b;
  cin >> a >> b;
  for(int j=0;j<26; j++){
    char fora = 'a'+j;
    int count = 0;
    int count2 =0;
  	for(int i=0; i<a.size(); i++){
        if(fora == a.at(i)){
          count++;
        }
    }
    for(int k=0; k<b.size(); k++){
         if(fora == b.at(k)){
           count2++;
         }
    }
    if(count==count2){
      if(j==25){
        cout << "YES";
    }
    }
    else{
      cout << "NO";
      break;
    }
  }
}
            
            
            
        