結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
Tawara
|
| 提出日時 | 2016-07-27 00:13:50 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 404 bytes |
| コンパイル時間 | 1,556 ms |
| コンパイル使用メモリ | 76,312 KB |
| 実行使用メモリ | 205,780 KB |
| 最終ジャッジ日時 | 2024-11-06 17:12:37 |
| 合計ジャッジ時間 | 35,191 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 1 RE * 1 |
ソースコード
import heapq as hpq from copy import deepcopy as dcp def solve(): Q = [] ans = N = int(raw_input()) Q = [(a,0) for a in map(int,raw_input().split())] hpq.heapify(Q) B = map(int,raw_input().split()) for i in xrange(N): q = dcp(Q) lv,cnt = hpq.heappop(q) for j in xrange(N): lv,cnt = hpq.heapreplace(q,(lv+B[(j+i)%N]/2,cnt+1)) ans = min(ans,max(q,key=lambda x:x[1])[1]) print ans solve()
Tawara