結果
| 問題 |
No.1016 三目並べ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-03 21:49:53 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 715 bytes |
| コンパイル時間 | 1,592 ms |
| コンパイル使用メモリ | 170,280 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-03 02:09:31 |
| 合計ジャッジ時間 | 1,985 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define range(a) a.begin(), a.end()
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(15);
int T; cin >> T;
while (T--) {
int N; cin >> N;
string S; cin >> S;
S = "xxxxx" + S + "xxxxx";
N = S.size();
bool ans = false;
ans |= S.find("ooo") != string::npos;
ans |= S.find("o-o") != string::npos;
ans |= S.find("oo-") != string::npos;
ans |= S.find("-oo") != string::npos;
ans |= S.find("o---o") != string::npos;
cout << (ans ? "O" : "X") << '\n';
}
}