結果
問題 | No.513 宝探し2 |
ユーザー | ttr |
提出日時 | 2020-06-06 22:36:33 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 544 bytes |
コンパイル時間 | 67 ms |
コンパイル使用メモリ | 10,828 KB |
実行使用メモリ | 24,312 KB |
平均クエリ数 | 70.17 |
最終ジャッジ日時 | 2023-09-24 02:38:53 |
合計ジャッジ時間 | 1,402 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 37 ms
23,408 KB |
testcase_01 | AC | 35 ms
23,608 KB |
testcase_02 | AC | 37 ms
24,036 KB |
testcase_03 | AC | 36 ms
24,312 KB |
testcase_04 | AC | 33 ms
23,756 KB |
testcase_05 | AC | 35 ms
23,668 KB |
testcase_06 | AC | 34 ms
24,036 KB |
testcase_07 | AC | 34 ms
23,464 KB |
testcase_08 | AC | 37 ms
23,568 KB |
testcase_09 | AC | 39 ms
23,532 KB |
testcase_10 | AC | 39 ms
24,108 KB |
testcase_11 | AC | 37 ms
23,664 KB |
ソースコード
lx = 0 rx = 10**5 while lx < rx: print(lx, -1) tl = int(input()) print(rx, -1) tr = int(input()) mx = (lx+rx)//2 if lx+1 == rx: if tl > tr: mx += 1 break if tl < tr: rx = mx else: lx = mx ly = 0 ry = 10**5 while ly < ry: print(-1, ly) tl = int(input()) print(-1, ry) tr = int(input()) my = (ly+ry)//2 if ly+1 == ry: if tl > tr: my += 1 break if tl < tr: ry = my else: ly = my print(mx, my)