結果
問題 |
No.197 手品
|
ユーザー |
![]() |
提出日時 | 2015-04-29 00:06:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,123 bytes |
コンパイル時間 | 669 ms |
コンパイル使用メモリ | 86,276 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-06-27 07:26:50 |
合計ジャッジ時間 | 1,898 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 42 WA * 1 |
ソースコード
#include <algorithm> #include <vector> #include <cfloat> #include <string> #include <cmath> #include <set> #include <cstdlib> #include <map> #include <ctime> #include <iomanip> #include <functional> #include <deque> #include <iostream> #include <cstring> #include <queue> #include <cstdio> #include <stack> #include <climits> #include <cctype> using namespace std; typedef long long ll; int main() { string s; cin >> s; int a; cin >> a; string z; cin >> z; int cnt1, cnt2; cnt1 = cnt2 = 0; for (int i = 0; i < s.size(); i++) { cnt1 += s[i] == 'o'; } for (int i = 0; i < z.size(); i++) { cnt2 += z[i] == 'o'; } if (cnt1 != cnt2) { cout << "SUCCESS" << endl; return 0; } string s1 = { s[1], s[0], s[2] }, s2 = { s[0], s[2], s[1] }; string t1 = { s[1], s[2], s[0] }, t2 = { s[2], s[0], s[1] }; string u = { s[2], s[1], s[0] }; if ((a == 0 && s == z) || (a%2 != 0 && (z == s1 || z == s2)) || ((a > 3 && a%2 != 0) && z == u) || (a > 0 && a%2 == 0 && (z == t1 || z == t2)) || (a > 0 && a%2 == 0 && s == z)) { cout << "FAILURE" << endl; }else { cout << "SUCCESS" << endl; } return 0; }