結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2020-03-06 16:32:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 1,673 ms |
コンパイル使用メモリ | 167,196 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 02:54:13 |
合計ジャッジ時間 | 2,833 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> #define INF 990000000 //13 using namespace std; int main() { string s; cin>>s; int o=0; int x=0; if(s.find("OOO")==string::npos)o=(int)s.size()+1; else o=s.find("OOO"); if(s.find("XXX")==string::npos)x=(int)s.size()+1; else x=s.find("XXX"); //cout <<x<<" "<<o<<endl; if(o>x){ cout <<"West"<<endl; }else if(o<x){ cout <<"East"<<endl; }else{ cout <<"NA"<<endl; } }