結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
|
提出日時 | 2019-05-01 16:46:16 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 616 ms |
コンパイル使用メモリ | 57,300 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 12:36:06 |
合計ジャッジ時間 | 1,685 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include <iostream>#include <string>using namespace std;int main(){string St;int x=0,y=0,east=0,west=0;cin>>St;while(1){if(St[y]=='O'){east++;west=0;}else{west++;east=0;}y++;if(east==3){cout<<"East"<<endl;return 0;}if(west==3){cout<<"West"<<endl;return 0;}if(y==St.size()){cout<<"NA"<<endl;return 0;}}}