結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
keijak
|
| 提出日時 | 2021-04-19 21:46:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 2,000 ms |
| コード長 | 606 bytes |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 27,744 KB |
| 平均クエリ数 | 19.82 |
| 最終ジャッジ日時 | 2024-07-17 11:14:21 |
| 合計ジャッジ時間 | 8,365 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
n = int(input())
if n <= 2:
print(n, 1, flush=True)
t = int(input())
assert t == 0
exit(0)
rem = n
if n & 1:
mid = (n + 1) // 2
print(1, mid, flush=True)
rem -= 1
else:
mid = n // 2
print(2, mid, flush=True)
rem -= 2
assert rem % 2 == 0
while True:
t = int(input())
if t in [0, 1]:
exit(0)
k, x = [int(x) for x in input().split()]
if x < mid:
y = n + 1 - x
if k == 2:
y -= 1
print(k, y, flush=True)
else:
if k == 2:
x += 1
y = n + 1 - x
print(k, y, flush=True)
keijak