結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2017-08-24 15:29:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 524 bytes |
コンパイル時間 | 542 ms |
コンパイル使用メモリ | 64,000 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 04:31:54 |
合計ジャッジ時間 | 1,309 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include<iostream> #include<string> using namespace std; int main() { string s; cin>>s; if(s.length()<3){ cout << "NA" << endl; } else { int east = s.find("OOO"); int west = s.find("XXX"); if(west==-1 && east==-1){ cout << "NA" << endl; } else if(west==-1) { cout << "East" << endl; } else if(east==-1) { cout << "West" << endl; } else if(west>east) { cout << "East" << endl; } else if(west<east) { cout << "West" << endl; } } return 0; }