結果

問題 No.486 3 Straight Win(3連勝)
ユーザー ilplrr
提出日時 2018-02-18 17:07:05
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 377 bytes
コンパイル時間 409 ms
コンパイル使用メモリ 57,692 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 04:29:31
合計ジャッジ時間 1,565 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
using namespace std;

int main()
{
    string s; cin >> s;

    int e = 0, w = 0;
    for (int i = 0; i < s.size() - 2; i++) {
        if (s.substr(i, 3) == "OOO") return cout << "East\n", 0;
        if (s.substr(i, 3) == "XXX") return cout << "West\n", 0;
    }
    cout << "NA\n";

    return 0;
}
0