結果
| 問題 | No.486 3 Straight Win(3連勝) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-30 13:12:45 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 630 bytes |
| 記録 | |
| コンパイル時間 | 869 ms |
| コンパイル使用メモリ | 176,688 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-12 18:11:53 |
| 合計ジャッジ時間 | 1,644 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define FORR(i,l,n) for(int (i)=l;(i)<(int)(n);++(i))
void solve() {
std::string S;
cin >> S;
int east = S.find("OOO");
int west = S.find("XXX");
if (east == string::npos && west == string::npos) {
std::cout << "NA" << std::endl;
}
else if (string::npos != east && east < west || west == string::npos) {
std::cout << "East" << std::endl;
}
else if (string::npos != west && west < east || east == string::npos) {
std::cout << "West" << std::endl;
}
}
int main() {
ios::sync_with_stdio(false);
solve();
return 0;
}