結果

問題 No.486 3 Straight Win(3連勝)
ユーザー aaaaaaiu
提出日時 2019-07-27 23:34:53
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 1,747 ms
コンパイル使用メモリ 191,436 KB
最終ジャッジ日時 2025-01-07 09:42:08
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    string s;
    cin >> s;
    int o = 0;
    int x = 0;
    for (char c : s) {
        if (c == 'O') {
            o++;
            if (o == 3) {
                puts("EAST");
                return 0;
            }
            x = 0;
        } else {
            x++;
            if (x == 3) {
                puts("WEST");
                return 0;
            }
            o = 0;
        }
    }
    puts("NA");
    return 0;
}
0