結果
| 問題 | 
                            No.197 手品
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Rp7rf
                         | 
                    
| 提出日時 | 2015-04-28 23:26:16 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,231 bytes | 
| コンパイル時間 | 682 ms | 
| コンパイル使用メモリ | 71,928 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-27 07:07:12 | 
| 合計ジャッジ時間 | 1,773 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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