結果

問題 No.197 手品
ユーザー 👑 CleyL
提出日時 2020-03-06 02:17:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 67,568 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-14 02:32:01
合計ジャッジ時間 1,838 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 42 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  string a,b;int n;cin>>a>>n>>b;
  int z = 0;
  for(int i = 0; 3 > i; i++)z+=a[i]=='o';
  for(int i = 0; 3 > i; i++)z-=b[i]=='o';
  if(z){
    cout << "SUCCESS" << endl;
    return 0;
  }else{
    if(n==1){
      reverse(b.begin(),b.end());
      if(a==b && a!="ooo" && a!="xxx"){
        cout << "SUCCESS" << endl;
        return 0;
      }
    }
  }
  cout << "FAILURE" << endl;
}
0