結果
問題 | No.9 モンスターのレベル上げ |
ユーザー | ゆるく |
提出日時 | 2014-10-12 03:40:21 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 592 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 10,852 KB |
実行使用メモリ | 9,756 KB |
最終ジャッジ日時 | 2023-08-28 20:43:32 |
合計ジャッジ時間 | 31,108 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 20 ms
8,768 KB |
testcase_01 | AC | 20 ms
8,720 KB |
testcase_02 | TLE | - |
testcase_03 | AC | 3,969 ms
9,396 KB |
testcase_04 | AC | 2,226 ms
9,364 KB |
testcase_05 | AC | 1,527 ms
9,304 KB |
testcase_06 | AC | 488 ms
9,056 KB |
testcase_07 | AC | 31 ms
8,864 KB |
testcase_08 | AC | 657 ms
9,132 KB |
testcase_09 | AC | 4,918 ms
9,528 KB |
testcase_10 | AC | 20 ms
8,624 KB |
testcase_11 | TLE | - |
testcase_12 | TLE | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
import heapq from collections import deque from copy import deepcopy d = deque() n = int(input()) a = [] for i in (input().split()): heapq.heappush(a,[int(i),0]) b = deque(list(map(int, input().split()))) c = n ans = 0xFFFFFFFF while (c): tmp = deepcopy(a) mx = 0 mn = 0xFFFFFFFF count = 0 for bb in b: t = heapq.heappop(tmp) t[0] += bb >> 1 t[1] += 1 mx = max(mx, t[1]) if mx >= ans: break heapq.heappush(tmp, t) c -= 1 ans = min(ans, mx) b.rotate(1) print(ans)