2756Magic growth hormone

2756   Magic growth hormone

题目描述

      Recently Fry develop a new kind of growth hormone, which can make flowers to be higher and higher.

      Now Fry have some flowers, each of them has a initial hight. Every time Fry can chose no more than k continuous flowers and get them higher for 1 unit. Fry have only m unit of growth hormone, which means he could just do this operations for m times.

      Fry wants the shortest of his flower to be as higher as possible. Can you count how it could be ?

输入格式:

     There is a T T<=100at the beginning of file, show that there is T case follow.

      For each case, first line gets three integer n,m,k, means the number of Fry’s flowers, how much growth hormone Fry has, and the most flowers the growth hormone can influence.

      The second line gets n integer, mean the initial hight (<=100000)of each flowers.

(1<=n,m<=100000,1<=k<=n)

输出格式:

      For each case, output "Case #x: " , x mean the number of case,starting from 1.

      For each question, output one integer, means the Maximum height of the shortest flowers after Fry use out of his growth hormone.

输入样例 复制
2
4 4 3
4 1 2 3
4 4 2
4 1 2 3
输出样例 复制
Case #1: 5
Case #2: 4

说明

1
6
通过提交
时空限制1000ms/32mb
题目来源
评测方式在线评测
题目类型
难        度