結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
|
提出日時 | 2017-02-25 20:28:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 672 bytes |
コンパイル時間 | 1,585 ms |
コンパイル使用メモリ | 167,440 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-26 04:07:23 |
合計ジャッジ時間 | 2,518 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> #define get_variable_name(x) #x #define debug(x) cout << #x << " = " << x << endl #define rep(i, begin, end) for(int (i) = (begin); (i) < (end); (i)++) using namespace std; using ll = int64_t; int main() { ios::sync_with_stdio(false); string s; cin >> s; int index = 0; while(index+2 < s.size()) { char c = s[index]; bool f = (c == s[index+1] and c == s[index+2]); if(f) { if(c == 'X') { cout << "West" << endl; } else { cout << "East" << endl; } return 0; } index++; } cout << "NA" << endl; }