結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2017-06-09 16:44:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 371 bytes |
コンパイル時間 | 501 ms |
コンパイル使用メモリ | 58,584 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 04:28:06 |
合計ジャッジ時間 | 1,444 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include <iostream> #include <sstream> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { string s; cin >> s; int a = (int)s.find("OOO"); int b = (int)s.find("XXX"); if (a >= 0 && (b < 0 || b > a)) { cout << "East" << endl; } else if (b >= 0) { cout << "West" << endl; } else { cout << "NA" << endl; } return 0; }