結果
問題 |
No.9 モンスターのレベル上げ
|
ユーザー |
![]() |
提出日時 | 2019-12-16 22:34:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 318 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-02 20:41:55 |
合計ジャッジ時間 | 20,759 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 5 |
ソースコード
import sys input = sys.stdin.readline from heapq import * from collections import deque def main(): n = int(input()) ans = 1 << 30 p = [l * 1510 for l in map(int, input().split())] heapify(p) enemies = deque(map(int, input().split())) for s in range(n): party = p[:] for el in enemies: x = heappop(party) heappush(party, (x // 1510 + enemies[el % n] // 2) * 1510 + x % 1510 + 1) ans = min(ans, max(x % 1510 for x in party)) enemies.rotate(1) print(ans) if __name__ == "__main__": main()