結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
karin7831
|
| 提出日時 | 2017-02-27 11:12:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 728 bytes |
| コンパイル時間 | 1,838 ms |
| コンパイル使用メモリ | 177,796 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 19:19:07 |
| 合計ジャッジ時間 | 2,347 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 WA * 14 |
ソースコード
#include <bits/stdc++.h>
const long long MOD = 1000000007;
const int INF = INT_MAX / 2;
const long double PI = 3.1415926;
#define FOR(i, r, n) for(int i=(ll)(r); i<(ll)(n); i++)
#define REP(i, n) FOR(i, (0), n)
#define ALL(r) r.begin(), r.end()
#define ll long long int
using namespace std;
vector<pair<ll, ll>> vp;
vector<vector<ll>> vv(110, vector<ll>(50, 0));
vector<tuple<ll, ll, ll>> vt;
set<ll> st;
map<ll, ll> mp;
int main()
{
string s;
cin >> s;
bool isw = false;
int cnt = 0;
REP(i,s.size())
{
if(cnt>=3)
{
cout << (isw ? "West" : "East") << endl;
return 0;
}
if(s[i]=='O')
{
if (isw) cnt = 1;
else cnt++;
}
else
{
if (isw) cnt++;
else cnt = 1;
}
}
cout << "NA" << endl;
}
karin7831