結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2018-09-04 19:21:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 413 bytes |
コンパイル時間 | 1,264 ms |
コンパイル使用メモリ | 158,676 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-15 13:41:15 |
合計ジャッジ時間 | 2,544 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 20 |
ソースコード
#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 << (Se ? "East" : "West") << endl; return 0; } } cout << "NA" << endl; return 0; }