結果
| 問題 | No.486 3 Straight Win(3連勝) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-02 16:30:25 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 249µs | |
| コード長 | 584 bytes |
| 記録 | |
| コンパイル時間 | 413 ms |
| コンパイル使用メモリ | 98,964 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-09-27 05:08:11 |
| 合計ジャッジ時間 | 1,900 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stdio.h>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <math.h>
using namespace std;
#define Would
#define you
int w, e;
int main() {
string h, ans;
cin >> h;
for (int i = 0; i < h.length(); ++i) {
if (h[i] == 'O') {
++e;
w = 0;
}
else {
++w;
e = 0;
}
if (w == 3) {
cout << "West" << endl;
return 0;
}
else if (e == 3) {
cout << "East" << endl;
return 0;
}
}
cout << "NA" << endl;
}