結果
| 問題 | No.1016 三目並べ |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-03-21 21:07:00 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 42 ms / 2,000 ms |
| + 207µs | |
| コード長 | 377 bytes |
| 記録 | |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 64,508 KB |
| 実行使用メモリ | 58,224 KB |
| 最終ジャッジ日時 | 2026-10-16 15:35:19 |
| 合計ジャッジ時間 | 2,142 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
ソースコード
win = ["ooo", "-oo", "o-o", "oo-", "-o--", "--o-"]
def solve():
n, S = input().split()
for w in win:
if w in S:
print("O")
return
S = S.split("o")
for s in S[1:-1]:
if "x" not in s and len(s) % 2 == 1 and len(s) >= 3:
print("O")
return
print("X")
for _ in range(int(input())):
solve()