結果
| 問題 | No.69 文字を自由に並び替え | 
| コンテスト | |
| ユーザー |  aaa | 
| 提出日時 | 2018-10-06 19:11:48 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 859 bytes | 
| コンパイル時間 | 961 ms | 
| コンパイル使用メモリ | 96,200 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-14 07:12:12 | 
| 合計ジャッジ時間 | 1,491 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 15 | 
ソースコード
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>
using namespace std;
int main() {
	int i, j, k;
	string s1, s2;
	vector<int>list1(33, 0), list2(33, 0);
	cin >> s1 >> s2;
	for (i = 0; i < s1.length(); i++) {
		list1[(int)s1[i]-97]++;
	}
	for (i = 0; i < s2.length(); i++) {
		list2[(int)s2[i] - 97]++;
	}
	bool flag = false;
	for (i = 0; i < 33; i++) {
		if (list1[i] != list2[i]) {
			flag = true;
			break;
		}
	}
	if (flag == false) {
		cout << "YES" << endl;
	}
	else if (flag == true) {
		cout << "NO" << endl;
	}
	
	getchar();
	getchar();
	return 0;
}
            
            
            
        