logo AlgoBeat OnlineJudge
登录 注册

#215887. [JOI Open 2013] Watching

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

There are many interesting cultures in Australia such as various sports and various kinds of animals. You are trying to watch many events held on a road in Brisbane.

The road is separated into sections. The sections are numbered from west to east. You want to watch events. The -th event will be held on the section .

In order to watch the events, you prepared small cameras and large cameras. You can choose a positive integer as a parameter for taking pictures. Then, a small camera can take a picture of at most consecutive sections, and a large camera can take a picture of at most consecutive sections. Pictures of a section can be taken by more than one cameras. You want to take pictures of all the sections of the events. Since it is expected many people will visit the events, for the sake of safety, you have to fix the positions of the cameras and it is not allowed to move them during the events. The larger the parameter is, the higher the cost to take pictures is. So, you want to minimize the value of .

Task

Write a program that, given information of the events and the number of cameras, determine the minimum value of so that the pictures of all the sections of the events can be taken.

输入格式

Read the following data from the standard input.

  • The first line of input contains three space separated integers , where is the number of the events, is the number of small cameras, and is the number of large cameras.
  • The -th line () of the following lines contains an integer , the section where the -th event will be held.

输出格式

To the standard output, write the minimum value of so that the pictures of all the sections of the events can be taken.

样例

样例输入 1

3 1 1
2
11
17

样例输出 1

4

样例输入 2

13 3 2
33
66
99
10
83
68
19
83
93
53
15
66
75

样例输出 2

9

数据范围与提示

Sample Explanation

In this example, when you choose , you can take pictures of all the sections of the events. For example, you can take pictures from the section 1 to 3 by a small camera, and you can take pictures from the section 11 to 18 by a large camera.

Constraints

All input data satisfy the following conditions.

  • .
  • .
  • .
  • ().

Subtask

Subtask1 [50 points]

  • is satisfied.

Subtask2 [50 points]

There are no additional constraints.