結果
問題 | No.67 よくある棒を切る問題 (1) |
ユーザー | tktk_snsn |
提出日時 | 2020-12-26 15:24:48 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 479 ms |
コンパイル使用メモリ | 11,912 KB |
実行使用メモリ | 60,728 KB |
最終ジャッジ日時 | 2023-10-24 23:22:40 |
合計ジャッジ時間 | 20,053 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 531 ms
56,380 KB |
testcase_01 | AC | 455 ms
42,296 KB |
testcase_02 | AC | 480 ms
46,348 KB |
testcase_03 | AC | 510 ms
50,836 KB |
testcase_04 | AC | 552 ms
55,008 KB |
testcase_05 | AC | 554 ms
55,000 KB |
testcase_06 | AC | 551 ms
55,000 KB |
testcase_07 | AC | 535 ms
56,116 KB |
testcase_08 | AC | 533 ms
56,116 KB |
testcase_09 | AC | 530 ms
56,116 KB |
testcase_10 | AC | 521 ms
53,640 KB |
testcase_11 | AC | 523 ms
54,468 KB |
testcase_12 | AC | 519 ms
53,392 KB |
testcase_13 | AC | 526 ms
55,060 KB |
testcase_14 | AC | 525 ms
55,588 KB |
testcase_15 | AC | 528 ms
54,004 KB |
testcase_16 | TLE | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
import numpy as np eps = 1e-9 N = int(input()) L = np.array(input().split(), dtype=np.float64) K = int(input()) l = 0. r = 1e9 + eps while r - l > eps: m = (r + l) * 0.5 if (L / m + eps).astype(np.int32).sum() >= K: l = m else: r = m print("{:.10f}".format((l + r) * 0.5))