結果
| 問題 | No.1016 三目並べ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-03 21:49:53 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 715 bytes |
| 記録 | |
| コンパイル時間 | 971 ms |
| コンパイル使用メモリ | 182,472 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-24 09:19:36 |
| 合計ジャッジ時間 | 2,272 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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';
}
}