hiho week 216 register

Ended

Participants:197

Verdict:Accepted
Score:100 / 100
Submitted:2018-08-25 11:43:27

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import heapq
nmk = map(intraw_input().split())
a = map(intraw_input().split())
index = 0
b = []
while index + 1 < len(a):
    if a[index] < a[index + 1]:
        b.append([0a[index + 1] - a[index]1.0])
        b[-1][0] = b[-1][2] / b[-1][1]
    index += 1
heapq.heapify(b)
while k and b:
    top = heapq.heappop(b)
    top[2] += 1
    top[0] = top[2] / top[1]
    heapq.heappush(btop)
    k -= 1
res = heapq.heappop(b) if b else [001]
print "{:.1f}".format(res[1] / res[2])
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX