結果

問題 No.69 文字を自由に並び替え
ユーザー umaumax
提出日時 2017-05-03 18:53:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 500 ms
コンパイル使用メモリ 59,968 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-14 06:35:52
合計ジャッジ時間 1,123 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstring>
#include <iostream>

using namespace std;

int main(int argc, const char *argv[])
{
	string A, B;
	cin >> A >> B;
	const char *a = A.c_str();
	const char *b = B.c_str();
	sort((char *)a, (char *)&a[A.size()]);
	sort((char *)b, (char *)&b[B.size()]);
	cout << (strcmp(a, b) == 0 ? "YES" : "NO") << endl;
	return 0;
}
0