結果
問題 | No.9 モンスターのレベル上げ |
ユーザー |
![]() |
提出日時 | 2019-12-16 22:28:03 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 2,624 ms / 5,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-02 20:36:46 |
合計ジャッジ時間 | 26,249 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import sys input = sys.stdin.readline from heapq import * n = int(input()) ans = 1 << 30 p = [l * 2000 for l in map(int, input().split())] heapify(p) enemies = list(map(int, input().split())) for s in range(n): party = p[:] for i in range(n): x = heappop(party) heappush(party, (x // 2000 + enemies[(s + i) % n] // 2) * 2000 + x % 2000 + 1) ans = min(ans, max(x % 2000 for x in party)) print(ans)