結果

問題 No.69 文字を自由に並び替え
ユーザー nksk38
提出日時 2017-06-18 22:44:13
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 76,492 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-06-27 13:47:11
合計ジャッジ時間 1,219 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pr;

string A, B;
map<char, int> m;

int main()
{
	cin >> A >> B;

	for (int i = 0; i < B.size(); i++) {
		if (A.find(B[i]) == string::npos || 
			B.find(A[i]) == string::npos) {
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
	return	0;
}
0