結果
問題 |
No.197 手品
|
ユーザー |
![]() |
提出日時 | 2015-07-12 02:20:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 532 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 61,312 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 09:57:49 |
合計ジャッジ時間 | 1,597 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 WA * 2 |
ソースコード
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(void){ string b, a; int n; cin >> b >> n >> a; if (count(b.begin(), b.end(), 'o') != count(a.begin(), a.end(), 'o')){ cout << "SUCCESS" << endl; } else if (n == 0){ cout << ((b == a) ? "FAILURE" : "SUCCESS") << endl; } else if (n == 1){ string d, e, f; d = b[0], e = b[1], f = b[2]; cout << ((a == d + e + f || a == e + d + f || a == d + f + e) ? "FAILURE" : "SUCCESS") << endl; } else cout << "FAILURE" << endl; return 0; }