結果

問題 No.69 文字を自由に並び替え
ユーザー highd
提出日時 2016-08-29 14:53:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 338 bytes
コンパイル時間 920 ms
コンパイル使用メモリ 76,676 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 06:21:35
合計ジャッジ時間 1,550 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
#include <string>

int main() {
	std::string a,b;
	std::getline(std::cin,a);
	std::getline(std::cin,b);
	std::map<char,int> a_map,b_map;
	for(auto a_ch:a){
		a_map[a_ch]++;
	}
	for(auto b_ch:b){
		b_map[b_ch]++;
	}
	std::cout<<((a_map==b_map)?"YES":"NO")<<std::endl;
	// your code goes here
	return 0;
}
0