結果
| 問題 |
No.1016 三目並べ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-21 21:07:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 2,000 ms |
| コード長 | 377 bytes |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 60,032 KB |
| 最終ジャッジ日時 | 2024-10-09 11:43:26 |
| 合計ジャッジ時間 | 1,269 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
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()