結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2018-09-04 19:23:18 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 412 bytes |
コンパイル時間 | 3,156 ms |
コンパイル使用メモリ | 158,312 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 13:45:16 |
合計ジャッジ時間 | 3,469 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include<bits/stdc++.h> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; typedef long long int ll; int main() { int T=0,Se=0; string S; cin >> S; REP(i,S.size()){ if(S[i] == 'O'){ T++; Se=0; }else{ Se++; T = 0; } if(T == 3 || Se == 3){ cout << (T ? "East" : "West") << endl; return 0; } } cout << "NA" << endl; return 0; }