結果

問題 No.486 3 Straight Win(3連勝)
ユーザー not_522
提出日時 2018-11-22 00:07:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 1,330 bytes
コンパイル時間 1,403 ms
コンパイル使用メモリ 121,492 KB
最終ジャッジ日時 2025-01-06 17:06:45
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
プレゼンテーションモードにする

#include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
using namespace std;
struct BoolName : numpunct<char> {
string t, f;
BoolName (string t = "Yes", string f = "No") : t(t), f(f) {}
string do_truename() const {return t;}
string do_falsename() const {return f;}
};
struct Initializer {
Initializer() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(15) << boolalpha;
cout.imbue(locale(cout.getloc(), new BoolName));
}
} initializer;
template<typename T> istream& operator>>(istream &s, vector<T> &v) {
for (T &t : v) s >> t;
return s;
}
template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {
for (const T &t : v) s << t << endl;
return s;
}
void set_bool_name(string t, string f) {
cout.imbue(locale(cout.getloc(), new BoolName(t, f)));
}
int main() {
string s;
cin >> s;
for (int i = 0; i + 2 < int(s.size()); ++i) {
if (s.substr(i, 3) == "OOO") {
cout << "East" << endl;
return 0;
}
if (s.substr(i, 3) == "XXX") {
cout << "West" << endl;
return 0;
}
}
cout << "NA" << endl;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0