結果
| 問題 | No.1016 三目並べ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-19 13:58:38 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 59 ms / 2,000 ms |
| + 206µs | |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 64,732 KB |
| 実行使用メモリ | 59,476 KB |
| 最終ジャッジ日時 | 2026-10-17 03:35:04 |
| 合計ジャッジ時間 | 2,959 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
ソースコード
s=["-oo","oo-","-o--","--o-","ooo"]
for _ in range(int(input())):
a,b=input().split();ans="X"
c=0;d=0;f=0
while d<len(b):
if b[d]=="-" and f:
c+=1
elif b[d]=="o":
if c&1 and f:
ans="O"
f=1
if b[d]=="x":
f=0
if b[d]!="-":
c=0
d+=1
for i in range(len(b)):
for j in s:
if b[i:i+len(j)]==j:
ans="O"
print(ans)