結果
| 問題 |
No.2962 Sum Bomb Bomber
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-24 21:58:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 153 ms / 2,000 ms |
| コード長 | 682 bytes |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 82,416 KB |
| 実行使用メモリ | 71,884 KB |
| 平均クエリ数 | 111.40 |
| 最終ジャッジ日時 | 2025-02-24 21:58:42 |
| 合計ジャッジ時間 | 13,354 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 64 |
ソースコード
N = int(input())
def ask(x,y,f):
if f == 1:
print(1,x,y)
a = int(input())
print(1,x + 1,y)
b = int(input())
if b >= a:
return True
else:return False
else:
print(1,x,y)
a = int(input())
print(1,x,y + 1)
b = int(input())
return b >= a
end = 10 ** 8
start = -10 ** 8 - 1
while end - start > 1:
mid = end + start >> 1
if ask(mid,0,1):
end = mid
else:
start = mid
u = end
end = 10 ** 8
start = -10 ** 8 - 1
while end - start > 1:
mid = end + start >> 1
if ask(0,mid,2):
end = mid
else:
start = mid
v = end
print(2,u,v)