結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2016-10-21 00:33:36 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 642 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 62,340 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 13:35:40 |
合計ジャッジ時間 | 1,653 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 37 WA * 6 |
ソースコード
#include <iostream> #include <math.h> #include <string> #include <algorithm> using namespace std; int main(){ string sb; string sa; long long n; int cnta = 0; int cntb = 0; cin >>sb>> n>>sa; for (int i = 0; i < 3; i++){ if (sb[i] == 'o'){ cntb++; } if (sa[i] == 'o'){ cnta++; } } if (cntb != cnta){ cout << "SUCCESS" << endl; }else if (n >= 2){ cout << "FAILURE" << endl; } else if (n == 0){ if (sb == sa){ cout << "FAILURE" << endl; } else{ cout << "SUCCESS" << endl; } } else{ if (sb[1] == sa[1]){ cout << "SUCCESS" << endl; } else{ cout << "FAILURE" << endl; } } return 0; }