結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2018-01-15 21:27:37 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 559 bytes |
コンパイル時間 | 390 ms |
コンパイル使用メモリ | 58,696 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-24 03:29:30 |
合計ジャッジ時間 | 1,202 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 24 |
ソースコード
#include<iostream> #include<vector> #include<string> #include<cstdio> using namespace std; int main(){ string s; int count=0,flag=0; cin >> s; for(int i=1;s[i]!='\0';i++){ if(s[i]==s[i-1]){ count++; if(count==3){ if(s[i]=='O'){ cout << "East"; return 0; } else{ cout << "West"; return 0; } } } else{ count=0; } } }