結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2016-12-28 14:16:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 56 ms / 5,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 1,361 ms |
コンパイル使用メモリ | 163,368 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 06:26:57 |
合計ジャッジ時間 | 2,046 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }