結果

問題 No.2962 Sum Bomb Bomber
ユーザー Kude
提出日時 2024-11-16 15:39:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 514 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 81,536 KB
実行使用メモリ 69,608 KB
平均クエリ数 111.52
最終ジャッジ日時 2024-11-16 15:40:14
合計ジャッジ時間 12,491 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 64
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

xl = -10 ** 8 - 1
xr = 10 ** 8 + 1
while xr - xl > 2:
    c1 = (xl + xr) // 2
    c2 = c1 + 1
    print(1, c1, 0)
    d1 = int(input())
    print(1, c2, 0)
    d2 = int(input())
    if d1 < d2:
        xr = c2
    else:
        xl = c1
yl = -10 ** 8 - 1
yr = 10 ** 8 + 1
while yr - yl > 2:
    c1 = (yl + yr) // 2
    c2 = c1 + 1
    print(1, 0, c1)
    d1 = int(input())
    print(1, 0, c2)
    d2 = int(input())
    if d1 < d2:
        yr = c2
    else:
        yl = c1
print(2, xl + 1, yl + 1)
0