結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
|
提出日時 | 2019-07-27 23:36:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 515 bytes |
コンパイル時間 | 1,975 ms |
コンパイル使用メモリ | 191,692 KB |
最終ジャッジ日時 | 2025-01-07 09:42:18 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#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; }