結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
|
提出日時 | 2019-05-01 16:44:44 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 666 ms |
コンパイル使用メモリ | 56,436 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 12:35:57 |
合計ジャッジ時間 | 1,712 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 WA * 2 |
ソースコード
#include <iostream>#include <string>using namespace std;int main(){string St;int x=0,y=0,east=0,west=0;cin>>St;while(1){y++;if(St[y]=='O'){east++;west=0;}else{west++;east=0;}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;}}}