結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2018-10-20 21:45:42 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 396 bytes |
コンパイル時間 | 1,440 ms |
コンパイル使用メモリ | 54,872 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 02:53:23 |
合計ジャッジ時間 | 2,445 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 20 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(void){ // Your code here! string s; int W=0,E=0; cin>>s; for(int i=0;i<s.size();i++){ if(s[i]=='O'){W+=1;E=0;} else {E+=1;W=0;} if(W==3){cout<<"West"<<endl; return 0;} if(E==3){cout<<"East"<<endl; return 0;} } cout<<"NA"<<endl; return 0; }