結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2019-03-17 22:09:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 427 bytes |
コンパイル時間 | 1,452 ms |
コンパイル使用メモリ | 168,084 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-07 23:30:31 |
合計ジャッジ時間 | 2,682 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.length() >= 3) { for (int i = 0; i < s.length() - 2; i++) { if (s.substr(i, 3) == "OOO") { cout << "East" << endl; return 0; } else if (s.substr(i, 3) == "XXX") { cout << "West" << endl; return 0; } cout << "NA" << endl; } } else { cout << "NA" << endl; } return 0; }