結果
| 問題 | No.69 文字を自由に並び替え |
| コンテスト | |
| ユーザー |
fushime2
|
| 提出日時 | 2016-12-28 14:16:47 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 44 ms / 5,000 ms |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 987 ms |
| コンパイル使用メモリ | 180,104 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-25 00:24:42 |
| 合計ジャッジ時間 | 1,896 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)
#define ALL(x) (x).begin(),(x).end()
int main() {
string s, t;
cin >> s >> t;
sort(ALL(s));
bool f = false;
do {
if(s == t) f = true;
} while (next_permutation(ALL(s)));
puts(f ? "YES" : "NO");
return 0;
}
fushime2