結果
問題 | No.2962 Sum Bomb Bomber |
ユーザー | lif4635 |
提出日時 | 2024-11-16 16:13:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,607 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 82,668 KB |
実行使用メモリ | 75,332 KB |
平均クエリ数 | 129.11 |
最終ジャッジ日時 | 2024-11-16 16:14:04 |
合計ジャッジ時間 | 14,386 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 143 ms
73,692 KB |
testcase_01 | AC | 151 ms
75,256 KB |
testcase_02 | AC | 159 ms
73,320 KB |
testcase_03 | AC | 139 ms
72,968 KB |
testcase_04 | WA | - |
testcase_05 | AC | 148 ms
72,936 KB |
testcase_06 | AC | 143 ms
72,936 KB |
testcase_07 | AC | 161 ms
73,320 KB |
testcase_08 | WA | - |
testcase_09 | AC | 157 ms
73,312 KB |
testcase_10 | AC | 159 ms
73,576 KB |
testcase_11 | AC | 143 ms
72,936 KB |
testcase_12 | AC | 147 ms
73,192 KB |
testcase_13 | AC | 147 ms
72,936 KB |
testcase_14 | AC | 160 ms
73,832 KB |
testcase_15 | WA | - |
testcase_16 | AC | 144 ms
72,296 KB |
testcase_17 | AC | 139 ms
72,432 KB |
testcase_18 | AC | 146 ms
72,808 KB |
testcase_19 | AC | 142 ms
72,552 KB |
testcase_20 | AC | 138 ms
72,680 KB |
testcase_21 | AC | 142 ms
73,192 KB |
testcase_22 | AC | 153 ms
73,704 KB |
testcase_23 | AC | 148 ms
73,576 KB |
testcase_24 | AC | 145 ms
73,192 KB |
testcase_25 | AC | 129 ms
72,904 KB |
testcase_26 | AC | 150 ms
73,064 KB |
testcase_27 | WA | - |
testcase_28 | AC | 148 ms
72,680 KB |
testcase_29 | AC | 138 ms
72,296 KB |
testcase_30 | WA | - |
testcase_31 | AC | 129 ms
72,168 KB |
testcase_32 | AC | 154 ms
73,704 KB |
testcase_33 | AC | 148 ms
72,296 KB |
testcase_34 | AC | 151 ms
72,680 KB |
testcase_35 | AC | 157 ms
73,448 KB |
testcase_36 | WA | - |
testcase_37 | AC | 145 ms
73,320 KB |
testcase_38 | WA | - |
testcase_39 | AC | 158 ms
73,192 KB |
testcase_40 | WA | - |
testcase_41 | AC | 147 ms
73,320 KB |
testcase_42 | AC | 154 ms
72,936 KB |
testcase_43 | WA | - |
testcase_44 | AC | 145 ms
72,936 KB |
testcase_45 | AC | 148 ms
72,680 KB |
testcase_46 | AC | 155 ms
73,704 KB |
testcase_47 | AC | 147 ms
73,192 KB |
testcase_48 | AC | 160 ms
73,704 KB |
testcase_49 | AC | 148 ms
72,424 KB |
testcase_50 | AC | 160 ms
73,064 KB |
testcase_51 | AC | 129 ms
72,416 KB |
testcase_52 | AC | 161 ms
73,568 KB |
testcase_53 | AC | 133 ms
74,732 KB |
testcase_54 | AC | 133 ms
75,152 KB |
testcase_55 | WA | - |
testcase_56 | AC | 139 ms
74,544 KB |
testcase_57 | AC | 141 ms
73,956 KB |
testcase_58 | AC | 149 ms
72,672 KB |
testcase_59 | AC | 155 ms
72,416 KB |
testcase_60 | AC | 158 ms
73,312 KB |
testcase_61 | AC | 152 ms
72,416 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 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 ansy = l print(2,ansx,ansy)