結果
問題 |
No.197 手品
|
ユーザー |
![]() |
提出日時 | 2016-10-21 00:37:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 644 bytes |
コンパイル時間 | 472 ms |
コンパイル使用メモリ | 62,948 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 13:35:42 |
合計ジャッジ時間 | 1,684 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 41 WA * 2 |
ソースコード
#include <iostream> #include <math.h> #include <string> #include <algorithm> using namespace std; int main(){ string sb; string sa; int 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]&&sa!=sb){ cout << "SUCCESS" << endl; } else{ cout << "FAILURE" << endl; } } return 0; }