結果
問題 | No.2962 Sum Bomb Bomber |
ユーザー | lif4635 |
提出日時 | 2024-11-16 16:13:12 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,615 bytes |
コンパイル時間 | 425 ms |
コンパイル使用メモリ | 82,072 KB |
実行使用メモリ | 74,372 KB |
平均クエリ数 | 128.80 |
最終ジャッジ日時 | 2024-11-16 16:13:35 |
合計ジャッジ時間 | 14,348 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 152 ms
73,704 KB |
testcase_01 | AC | 141 ms
74,372 KB |
testcase_02 | WA | - |
testcase_03 | AC | 121 ms
73,448 KB |
testcase_04 | WA | - |
testcase_05 | AC | 127 ms
72,936 KB |
testcase_06 | AC | 125 ms
73,960 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 146 ms
72,936 KB |
testcase_10 | AC | 147 ms
73,320 KB |
testcase_11 | AC | 135 ms
72,552 KB |
testcase_12 | AC | 149 ms
73,576 KB |
testcase_13 | AC | 130 ms
72,772 KB |
testcase_14 | AC | 166 ms
74,196 KB |
testcase_15 | WA | - |
testcase_16 | AC | 135 ms
72,296 KB |
testcase_17 | AC | 143 ms
73,192 KB |
testcase_18 | AC | 164 ms
72,424 KB |
testcase_19 | AC | 173 ms
73,064 KB |
testcase_20 | AC | 139 ms
72,296 KB |
testcase_21 | AC | 144 ms
73,064 KB |
testcase_22 | AC | 156 ms
73,320 KB |
testcase_23 | AC | 148 ms
72,808 KB |
testcase_24 | AC | 149 ms
73,192 KB |
testcase_25 | AC | 139 ms
72,168 KB |
testcase_26 | AC | 139 ms
72,552 KB |
testcase_27 | WA | - |
testcase_28 | AC | 124 ms
72,808 KB |
testcase_29 | AC | 121 ms
72,552 KB |
testcase_30 | WA | - |
testcase_31 | AC | 120 ms
71,784 KB |
testcase_32 | AC | 152 ms
73,152 KB |
testcase_33 | AC | 124 ms
72,296 KB |
testcase_34 | AC | 168 ms
73,192 KB |
testcase_35 | AC | 141 ms
73,192 KB |
testcase_36 | WA | - |
testcase_37 | AC | 128 ms
72,424 KB |
testcase_38 | WA | - |
testcase_39 | AC | 142 ms
73,192 KB |
testcase_40 | WA | - |
testcase_41 | AC | 130 ms
72,424 KB |
testcase_42 | AC | 154 ms
72,424 KB |
testcase_43 | WA | - |
testcase_44 | AC | 131 ms
72,808 KB |
testcase_45 | AC | 132 ms
73,192 KB |
testcase_46 | AC | 166 ms
73,320 KB |
testcase_47 | AC | 134 ms
73,064 KB |
testcase_48 | AC | 143 ms
73,728 KB |
testcase_49 | AC | 132 ms
72,828 KB |
testcase_50 | AC | 159 ms
73,576 KB |
testcase_51 | AC | 121 ms
72,800 KB |
testcase_52 | AC | 138 ms
73,440 KB |
testcase_53 | AC | 124 ms
73,088 KB |
testcase_54 | AC | 127 ms
73,432 KB |
testcase_55 | WA | - |
testcase_56 | AC | 128 ms
74,080 KB |
testcase_57 | AC | 148 ms
72,288 KB |
testcase_58 | AC | 152 ms
73,184 KB |
testcase_59 | AC | 137 ms
73,016 KB |
testcase_60 | AC | 136 ms
73,184 KB |
testcase_61 | AC | 135 ms
73,696 KB |
testcase_62 | WA | - |
testcase_63 | WA | - |
testcase_64 | WA | - |
ソースコード
"""input""" #int-input # input = sys.stdin.readline def II(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(MI()) #str-input def SI(): return input() def MSI(): return input().split() def SI_L(): return list(SI()) def SI_LI(): return list(map(int, SI())) #multiple-input def LLI(n): return [LI() for _ in range(n)] def LSI(n): return [SI() for _ in range(n)] #1-indexを0-indexでinput def MI_1(): return map(lambda x:int(x)-1, input().split()) def TI_1(): return tuple(MI_1()) def LI_1(): return list(MI_1()) from bisect import bisect_left,bisect_right inf = 1<<60 def tri_float(comparison, l = -10**8, r = 10**8): while abs(r - l)/abs(r) > error and abs(r - l) > error: l2 = (l*2+r)/3 r2 = (l+r*2)/3 if comparison(l2) > comparison(r2): l = l2 else: r = r2 return l2, comparison(l2) from functools import cache const = 10**8 n = II() @cache def solve(x): print(1,x,0) return II() l = -const r = const while abs(r - l) > 1: l2 = (l*2+r)//3 r2 = (l+r*2)//3 resl2 = solve(l2) resr2 = solve(r2) if resl2 > resr2: l = l2 + 1 elif resl2 < resr2: r = r2 - 1 else: l = l2 + 1 r = r2 - 1 ansx = l @cache def solve2(y): print(1,0,y) return II() l = -const r = const while abs(r - l) > 1: l2 = (l*2+r)//3 r2 = (l+r*2)//3 resl2 = solve2(l2) resr2 = solve2(r2) if resl2 > resr2: l = l2 + 1 elif resl2 < resr2: r = r2 - 1 else: l = l2 + 1 r = r2 - 1 ansy = l print(2,ansx,ansy)