結果
問題 | No.9 モンスターのレベル上げ |
ユーザー |
![]() |
提出日時 | 2015-02-09 17:22:38 |
言語 | Python2 (2.7.18) |
結果 |
TLE
|
実行時間 | - |
コード長 | 388 bytes |
コンパイル時間 | 295 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 14,016 KB |
最終ジャッジ日時 | 2024-06-23 16:28:11 |
合計ジャッジ時間 | 26,284 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 TLE * 3 -- * 8 |
ソースコード
from heapq import heappush,heappop N=int(raw_input()) A=map(int, raw_input().split()) B=map(int, raw_input().split()) ans = N for i in range (N): pq=[] curAns = 0 for a in A: heappush(pq,(a,0)) for j in range(N): ind=(i+j)%N level,num=heappop(pq) heappush(pq,(level+B[ind]/2,num+1)) curAns = max(curAns,num+1) ans = min(ans,curAns) print ans