当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

4368:Water World I

题目描述
  The well known PC game engineer Kevin Flynn designed a new game:Water World I.Player can enters the Virtual World and build the world through this game.
  Jack is the Administrator of Virtual World.He is responsible for water conservation project.Now Kevin gives him an important mission:building a reservoir made with thousands of mountain.

  The design chart of reservoir is very simple.every mountain's width is 1 unit and the hight is Hi numbered from left to right.The valley between two mountains can hold water.
  After the project had been finished,the Virtual World War I broken out.The reservoir is affected by the war,it become tilt.Jack want to know how much water can it hold now.
输入解释
  The input consists of several test cases(about 100).
  For each case,there are two number n,angle in first line.(0<n<=10000,0.0<=|angle|<=80.0).
  when it tilt toward left,angle>0,otherwise,angle<=0.
  Then follow one line there are n integers indicate that the i-th mountain's height is Hi.the mountain starts from left to right.(0<Hi<100000)
输出解释
  For each case print a real number,indicate the maximum of water it can hold. Your answer must be rounded to 2 digits after the decimal point.
输入样例
3 0.0
2 3 1
7 -15.0
1 3 2 5 2 3 4
输出样例
0.00
4.13
来自杭电HDUOJ的附加信息
Author FZU
Recommend zhuyuanchen520

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4368

最后修改于 2020-10-25T23:12:51+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)