結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
|
提出日時 | 2021-07-04 02:15:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 1,857 ms |
コンパイル使用メモリ | 193,892 KB |
最終ジャッジ日時 | 2025-01-22 17:25:10 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int n = s.length(); for (int i = 0; i <= n - 3; i++) { string t = s.substr(i, 3); if (t == "OOO") { cout << "East" << '\n'; return 0; } else if (t == "XXX") { cout << "West" << '\n'; return 0; } } cout << "NA" << '\n'; return 0; }