結果
| 問題 |
No.197 手品
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-03-06 02:17:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 456 bytes |
| コンパイル時間 | 526 ms |
| コンパイル使用メモリ | 67,584 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-14 02:31:59 |
| 合計ジャッジ時間 | 1,969 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 38 WA * 5 |
ソースコード
#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-=a[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;
}