結果
問題 | No.513 宝探し2 |
ユーザー | 👑 Kazun |
提出日時 | 2020-11-16 04:25:14 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 661 bytes |
コンパイル時間 | 2,141 ms |
コンパイル使用メモリ | 86,884 KB |
実行使用メモリ | 95,180 KB |
平均クエリ数 | 96.83 |
最終ジャッジ日時 | 2023-09-24 07:06:55 |
合計ジャッジ時間 | 4,991 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | AC | 103 ms
87,748 KB |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | AC | 107 ms
86,820 KB |
testcase_09 | AC | 102 ms
87,368 KB |
testcase_10 | RE | - |
testcase_11 | RE | - |
ソースコード
def quest(x,y): print(x,y,flush=True) d=int(input()) if d: return d else: exit(0) #X座標の決定 L,R=0,10**9 while R-L>2: K=(R-L)//3 alpha=L+K beta =L+2*K A=quest(alpha,0) B=quest(beta ,0) if A<B: R=beta else: L=alpha alpha,beta,gamma=quest(L,0),quest(L+1,0),quest(L+2,0) if alpha==min(alpha,beta,gamma): X=L elif beta==min(alpha,beta,gamma): X=L+1 else: X=L+2 D,U=0,10**9 while U-D>2: K=(U-D)//3 alpha=D+K beta =D+2*K A=quest(X,alpha) B=quest(X,beta ) if A<B: U=beta else: D=alpha quest(X,D);quest(X,D+1);quest(X,D+2)