結果
問題 | No.9 モンスターのレベル上げ |
ユーザー | OKCH3COOH |
提出日時 | 2019-10-23 22:15:12 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 421 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 11,000 KB |
実行使用メモリ | 8,612 KB |
最終ジャッジ日時 | 2023-09-21 11:11:00 |
合計ジャッジ時間 | 26,755 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
8,004 KB |
testcase_01 | AC | 16 ms
8,056 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 1,126 ms
8,484 KB |
testcase_05 | AC | 732 ms
8,364 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 15 ms
8,032 KB |
testcase_11 | AC | 2,415 ms
8,408 KB |
testcase_12 | AC | 3,020 ms
8,420 KB |
testcase_13 | AC | 2,274 ms
8,572 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 40 ms
8,008 KB |
ソースコード
from heapq import heapify, heappop, heappush N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) myMonster = [(a, 0) for a in A] heapify(myMonster) ans = float('inf') for start in range(N): A = myMonster[:] for b in B[start:] + B[:start]: now, time = heappop(A) now += b // 2 heappush(A, (now, time + 1)) ans = max([a for _, a in A]) print(ans)