300918: CF175E. Power Defence
Memory Limit:256 MB
Time Limit:3 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Power Defence
题意翻译
Vasya在玩某款塔防游戏。 他必须通过游戏的最后一关。为了做到这一点,他必须杀死主要的老大(Boss),他以每秒1米的速度从点(-∞,0)移动到游戏世界的点(+∞,0)。在点(x,1)和(x,- 1)上(x是整数),Vasya可以建立三种类型的塔:火焰塔、电气塔或冰冻塔。然而,不允许在同一点上建造两座塔。每种类型的塔架具有一定的作用半径和每秒的损伤值(除冰冻塔外)。如果在某个时刻,Boss在第K个冰冻塔的作用范围内,那么他的速度降低到k+1倍。 每个类型的塔的允许数量是已知的。有必要确定我们可能对Boss造成的最大伤害。 问题的所有距离都以米给出。Boss和塔的大小是如此之小,以至于它们可以被视为一个点。如果他和塔之间的距离小于或等于塔架的作用半径,则说明Boss在塔的作用半径内。 #### 输入: 第一行包含三个整数NF、NE和NS,分别表示可以建造的最大的火焰塔、电击塔和冰冻塔的数量。 他们满足(0<=NF,NE,NS<=20,1<=NF+NE+NS<=20) 第二行包含三个整数,RF,RE和RS(1<RF,RE,RS<1000)表示火焰塔、电击塔和冰冻塔的作用半径。每个数字用单个空间分隔。 第三行包含两个整数DF和DE(1<DF,DE<1000)表示一个火焰塔和一个电子塔每秒可以对Boss造成的伤害,数字用单个空间分隔。 ### 输出: 输出一个实数表示对Boss的最大可能伤害,绝对误差或相对误差不超过10^6 感谢@找寻 提供翻译题目描述
Vasya plays the Power Defence. He must pass the last level of the game. In order to do this he must kill the Main Villain, who moves in a straight line at speed 1 meter per second from the point $ (-∞,0) $ to the point $ (+∞,0) $ of the game world. In the points $ (x,1) $ and $ (x,-1) $ , where $ x $ is an integer number, Vasya can build towers of three types: fire-tower, electric-tower or freezing-tower. However, it is not allowed to build two towers at the same point. Towers of each type have a certain action radius and the value of damage per second (except freezing-tower). If at some point the Main Villain is in the range of action of $ k $ freezing towers then his speed is decreased by $ k+1 $ times. The allowed number of towers of each type is known. It is necessary to determine the maximum possible damage we can inflict on the Main Villain. All distances in the problem are given in meters. The size of the Main Villain and the towers are so small, that they can be considered as points on the plane. The Main Villain is in the action radius of a tower if the distance between him and tower is less than or equal to the action radius of the tower.输入输出格式
输入格式
The first line contains three integer numbers $ nf,ne $ and $ ns $ — the maximum number of fire-towers, electric-towers and freezing-towers that can be built $ (0<=nf,ne,ns<=20,1<=nf+ne+ns<=20) $ . The numbers are separated with single spaces. The second line contains three integer numbers $ rf,re $ and $ rs $ $ (1<=rf,re,rs<=1000) $ — the action radii of fire-towers, electric-towers and freezing-towers. The numbers are separated with single spaces. The third line contains two integer numbers $ df $ and $ de $ $ (1<=df,de<=1000) $ — the damage a fire-tower and an electronic-tower can inflict on the Main Villain per second (in the case when the Main Villain is in the action radius of the tower). The numbers are separated with single space.
输出格式
Print the only real number — the maximum possible damage to the Main Villain with absolute or relative error not more than $ 10^{-6} $ .
输入输出样例
输入样例 #1
1 0 0
10 10 10
100 100
输出样例 #1
1989.97487421
输入样例 #2
1 0 1
10 10 10
100 100
输出样例 #2
3979.94974843