結果
| 問題 |
No.1016 三目並べ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-03 21:57:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 715 bytes |
| コンパイル時間 | 1,537 ms |
| コンパイル使用メモリ | 168,268 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-03 02:37:25 |
| 合計ジャッジ時間 | 2,131 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 10 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i ++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
const ll MOD = 1e9 + 7;
const ll INF = 1e10;
const vector<int> dy = {-1,0,1,0};
const vector<int> dx = {0,1,0,-1};
int main() {
int t; cin >> t;
rep(_,t) {
int n;
string s;
cin >> n >> s;
char ans = 'X';
rep(i,n - 1) {
if (s[i] == 'o' && s[i + 1] == 'o') {
if (i == 0 || i == n - 2) continue;
if (s[i - 1] == 'x' && s[i + 2] == 'x') continue;
else {ans = 'O'; break;}
}
}
cout << ans << endl;
}
}