結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-30 21:24:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 668 bytes |
| コンパイル時間 | 1,089 ms |
| コンパイル使用メモリ | 55,544 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 13:28:22 |
| 合計ジャッジ時間 | 1,740 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 37 WA * 6 |
ソースコード
#include <iostream>
#include <string>
#define SUCCESS std::cout << "SUCCESS\n"
#define FAILURE std::cout << "FAILURE\n"
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int n;
std::string before, after;
std::cin >> before >> n >> after;
int coinNum = 0;
for(int i=0; i<3; ++i){
if(before[i]=='o') ++coinNum;
if( after[i]=='o') --coinNum;
}
if(coinNum!=0) SUCCESS;
else{
switch(n){
case 0: (before!=after) ? SUCCESS : FAILURE; break;
case 1: (before!=after) ? ((before[1]==after[1]) ? SUCCESS : FAILURE) : SUCCESS; break;
default: FAILURE;
}
}
}