結果
問題 | No.1016 三目並べ |
ユーザー |
![]() |
提出日時 | 2025-04-16 16:22:48 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 317 ms |
コンパイル使用メモリ | 82,380 KB |
実行使用メモリ | 61,852 KB |
最終ジャッジ日時 | 2025-04-16 16:24:00 |
合計ジャッジ時間 | 1,432 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 10 |
ソースコード
T = int(input()) for _ in range(T): N, S = input().split() N = int(N) dash_count = S.count('-') m = dash_count // 2 found = False for i in range(N - 2): triplet = S[i:i+3] existing_o = triplet.count('o') empty_in_triplet = triplet.count('-') possible_o = min(empty_in_triplet, m) if existing_o + possible_o >= 3: print("O") found = True break if not found: print("X")