結果
| 問題 |
No.2962 Sum Bomb Bomber
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-16 15:46:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 277 ms / 2,000 ms |
| コード長 | 795 bytes |
| コンパイル時間 | 610 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 105,832 KB |
| 平均クエリ数 | 141.00 |
| 最終ジャッジ日時 | 2024-11-16 15:46:28 |
| 合計ジャッジ時間 | 19,114 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 64 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
input = sys.stdin.readline
#n = int(input())
#alist = list(map(int,input().split()))
#alist = []
n = int(input())
l,r = -2*10**8,2*10**8
p = [(100,100),(102,102)]
def calc(x,y):
print(1,x,y,flush=True)
z = int(input())
#z = sum(abs(p[i][0] - x) + abs(p[i][1] - y) for i in range(len(p)))
return z
for _ in range(35):
mid = (l+r)//2
a,b = calc(0,mid),calc(0,mid+1)
if a <= b:
r = mid
else:
l = mid
ans1 = r
l,r = -2*10**8,2*10**8
for _ in range(35):
mid = (l+r)//2
a,b = calc(mid,0),calc(mid+1,0)
if a <= b:
r = mid
else:
l = mid
ans2 = r
print(2,ans2,ans1)