結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
noynote
|
| 提出日時 | 2017-02-24 22:26:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 758 bytes |
| コンパイル時間 | 1,586 ms |
| コンパイル使用メモリ | 160,908 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 03:59:20 |
| 合計ジャッジ時間 | 2,336 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
#include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) for(int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
const int INF = 2000000000;
using namespace std;
int main(){
string s;
cin >> s;
if(s.size() <= 2){
cout << "NA" << endl;
return 0;
}
rep(i,s.size() - 2){
if(s.substr(i,3) == "OOO"){
cout << "East" << endl;
return 0;
}else if(s.substr(i,3) == "XXX"){
cout << "West" << endl;
return 0;
}
}
cout << "NA" << endl;
return 0;
}
noynote