結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
zaichu
|
| 提出日時 | 2016-02-10 17:45:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 594 bytes |
| コンパイル時間 | 1,596 ms |
| コンパイル使用メモリ | 160,700 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-20 03:45:42 |
| 合計ジャッジ時間 | 2,425 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 43 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
int n;
cin >> s1 >> n >> s2;
int x = 0, y = 0;
for(int i = 0; i < 3; i++){
if(s1[i] == 'o') x++;
if(s2[i] == 'o') y++;
}
if(x != y){
cout << "SUCCESS" << endl;
return 0;
}
if(n == 0 and s1 != s2) cout << "SUCCESS" << endl;
else if(n == 1){
if(s1[0] == s2[1] and s1[1] == s2[0] and s1[2] == s1[2]) cout << "FAILURE" << endl;
else if(s1[0] == s2[0] and s1[1] == s2[2] and s1[2] == s2[1]) cout << "FAILURE" << endl;
else cout << "SUCCESS" << endl;
}else cout << "FAILURE" << endl;
return 0;
}
zaichu