結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
AREIDO2
|
| 提出日時 | 2017-02-25 14:30:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 496 bytes |
| コンパイル時間 | 426 ms |
| コンパイル使用メモリ | 56,100 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 04:07:10 |
| 合計ジャッジ時間 | 1,310 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main(){
string S;
cin >> S;
int w,e;
string result;
e = S.find("OOO");
w = S.find("XXX");
if(w == string::npos){
if(e == string::npos)
result = "NA";
else
result = "East";
}
else{
if(e == string::npos)
result = "West";
else{
if(w < e)
result = "West";
else
result = "East";
}
}
cout << result << "\n";
return 0;
}
AREIDO2