結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2017-03-01 17:00:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,140 bytes |
コンパイル時間 | 1,495 ms |
コンパイル使用メモリ | 158,984 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 13:39:59 |
合計ジャッジ時間 | 2,403 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<int, int> PII; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define MOD 1000000007 #define INF (1LL << 25) // 33554432 #define PI 3.14159265359 #define EPS 1e-12 //#define int ll signed main(void) { int n, a = 0, b = 0; string s, t; cin >> s >> n >> t; REP(i, s.size()) { if (s[i] == 'o') a++; if (t[i] == 'o') b++; } if (a != b) { cout << "SUCCESS" << endl; return 0; } if (n == 1) { if (a == 1) { if ((s == "oxx" && t == "xxo") || (s == "xxo" && t == "oxx")) { cout << "SUCCESS" << endl; return 0; } } else if (a == 2) { if ((s == "oox" && t == "xoo") || (s == "xoo" && t == "oox")) { cout << "SUCCESS" << endl; return 0; } } } else if(n == 0) { if(s != t) { cout << "SUCCESS" << endl; return 0; } } cout << "FAILURE" << endl; return 0; }