結果

問題 No.486 3 Straight Win(3連勝)
ユーザー ninoinui
提出日時 2020-01-21 12:40:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 1,287 ms
コンパイル使用メモリ 165,644 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 07:11:19
合計ジャッジ時間 2,062 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
  string S;
  cin >> S;
  int w = 0, e = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S.at(i) == 'O') w++;
    else e++;
    if (w == 3) {
      cout << "West" << "\n";
      return 0;
    }
    if (e == 3) {
      cout << "East" << "\n";
      return 0;
    }
  }
  cout << "NA" << "\n";
}
0