結果

問題 No.486 3 Straight Win(3連勝)
ユーザー pekempey
提出日時 2017-02-24 22:23:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 605 ms
コンパイル使用メモリ 75,380 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-26 03:50:34
合計ジャッジ時間 1,460 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>

using namespace std;

int main() {
	string s;
	cin >> s;
	for (int i = 0; i + 2 < s.size(); i++) {
		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;
}
0