結果
| 問題 | No.197 手品 |
| コンテスト | |
| ユーザー |
Rp7rf
|
| 提出日時 | 2015-04-28 23:26:16 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,231 bytes |
| 記録 | |
| コンパイル時間 | 724 ms |
| コンパイル使用メモリ | 94,496 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-14 18:13:31 |
| 合計ジャッジ時間 | 1,942 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | WA * 43 |
ソースコード
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <sstream>
#include <cstdio>
using namespace std;
const int MAX= 10000100;
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}
int main(void){
string sb,sf;
int n;
cin>>sb>>n>>sf;
bool ans = false;
if(sb[0] == 'o' && sb[1] == 'x' && sb[2] == 'x' &&
sf[0] == 'x' && sf[1] == 'x' && sf[2] == 'o'
){
ans = true;
}
if(sb[0] == 'x' && sb[1] == 'x' && sb[2] == 'o' &&
sf[0] == 'o' && sf[1] == 'x' && sf[2] == 'x'
){
ans = true;
}
if(sb[0] == 'o' && sb[1] == 'o' && sb[2] == 'o' &&
sf[0] == 'x' && sf[1] == 'x' && sf[2] == 'x'
){
ans = true;
}
if(sb[0] == 'x' && sb[1] == 'x' && sb[2] == 'x' &&
sf[0] == 'o' && sf[1] == 'o' && sf[2] == 'o'
){
ans = true;
}
if(n >= 2){
ans = false;
}
cout<<(ans?"SUCCESS":"FALURE")<<endl;
}
Rp7rf