The Frog's Games
来源:互联网 发布:造纸术的影响 知乎 编辑:程序博客网 时间:2024/06/05 23:02
点击打开题目
给你一个传送门:点击打开链接
The Frog's Games
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 5707 Accepted Submission(s): 2748
Problem Description
The annual Games in frogs' kingdom started again. The most famous game is the Ironfrog Triathlon. One test in the Ironfrog Triathlon is jumping. This project requires the frog athletes to jump over the river. The width of the river is L (1<= L <= 1000000000). There are n (0<= n <= 500000) stones lined up in a straight line from one side to the other side of the river. The frogs can only jump through the river, but they can land on the stones. If they fall into the river, they
are out. The frogs was asked to jump at most m (1<= m <= n+1) times. Now the frogs want to know if they want to jump across the river, at least what ability should they have. (That is the frog's longest jump distance).
are out. The frogs was asked to jump at most m (1<= m <= n+1) times. Now the frogs want to know if they want to jump across the river, at least what ability should they have. (That is the frog's longest jump distance).
Input
The input contains several cases. The first line of each case contains three positive integer L, n, and m.
Then n lines follow. Each stands for the distance from the starting banks to the nth stone, two stone appear in one place is impossible.
Then n lines follow. Each stands for the distance from the starting banks to the nth stone, two stone appear in one place is impossible.
Output
For each case, output a integer standing for the frog's ability at least they should have.
Sample Input
6 1 2225 3 311 218
Sample Output
411
Source
The 36th ACM/ICPC Asia Regional Dalian Site —— Online Contest
在 l / m 到 l 上二分求解,依次往最远处跳,用chck()函数判断。
代码如下:
阅读全文
0 0
- The Frog's Games
- The Frog's Games
- The Frog's Games
- The Frog's Games
- The Frog's Games 二分
- hdu4004 The Frog's Games
- The Frog's Games<hdoj4004>
- The Frog's Games(二分)
- 二分法 The Frog's Games
- The Frog's Games HDU
- HDU 4004 THE FROG’S GAMES(二分)
- HDU 4004 The Frog's Games
- hdu 4004 The Frog's Games
- HDU 4004 The Frog's Games
- HDU 4004 The Frog's Games
- HDOJ 4004 The Frog's Games 二分
- HDU 4004 The Frog's Games
- hdu 4004 The Frog's Games
- Android Hawk的源码解析,一款基于SharedPreferences的存储框架
- 排序之快速排序
- android 定位 获取地理位置 百度地图
- hibernate表结构三种继承关系
- HDU 6053 TrickGCD
- The Frog's Games
- 欢迎使用CSDN-markdown编辑器
- 2017 Multi-University Training Contest
- 6174问题
- Ionic环境
- 适配器模式(Adapter):类适配器、对象适配器
- 【bzoj1050】[HAOI2006]旅行comf
- python中闭包中变量的影响因素
- solr学习(1.3)-solr全文检索实现原理