CF73F.Plane of Tanks

省选/NOI-

通过率:0%

时间限制:4.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Vasya plays the Plane of Tanks. The tanks in this game keep trying to finish each other off. But your "Pedalny" is not like that... He just needs to drive in a straight line from point A to point B on the plane. Unfortunately, on the same plane are n enemy tanks. We shall regard all the tanks as points. At the initial moment of time Pedalny is at the point A. Enemy tanks would be happy to destroy it immediately, but initially their turrets are tuned in other directions. Specifically, for each tank we know the initial rotation of the turret a__i (the angle in radians relative to the OX axis in the counterclockwise direction) and the maximum speed of rotation of the turret w__i (radians per second). If at any point of time a tank turret will be aimed precisely at the tank Pedalny, then the enemy fires and it never misses. Pedalny can endure no more than k shots. Gun reloading takes very much time, so we can assume that every enemy will produce no more than one shot. Your task is to determine what minimum speed of v Pedalny must have to get to the point B. It is believed that Pedalny is able to instantly develop the speed of v, and the first k shots at him do not reduce the speed and do not change the coordinates of the tank.

瓦西娅正在玩《坦克世界》(Plane of Tanks)。游戏中的坦克会不断试图消灭彼此。但你的坦克“踏板号”(Pedalny)却并非如此……它只需在平面上沿一条直线从点 AA 行驶至点 BB 即可。不幸的是,同一平面上还分布着 nn 辆敌方坦克。我们将所有坦克均视为几何点。在初始时刻,“踏板号”位于点 AA。敌方坦克本乐于立刻将其摧毁,但此时它们的炮塔正朝向其他方向。具体而言,对每辆敌方坦克 ii,我们已知其炮塔的初始朝向角 aia_i(以弧度为单位,相对于 OXOX 轴逆时针测量)以及炮塔的最大旋转角速度 wiw_i(弧度/秒)。若在任意时刻某辆敌方坦克的炮塔恰好精确瞄准了“踏板号”,则该敌方坦克立即开火,且必中无疑。“踏板号”最多能承受 kk 发炮弹。由于装填时间极长,可假定每辆敌方坦克至多发射一次。你的任务是确定“踏板号”为成功抵达点 BB 所需的最小速度 vv。我们假设“踏板号”能瞬间达到速度 vv,且前 kk 发命中不会降低其速度,也不会改变其坐标。

输入格式

The first line contains 4 numbers – the coordinates of points A and B (in meters), the points do not coincide. On the second line number n is given (1 ≤ n ≤ 104). It is the number of enemy tanks. Each of the following n lines contain the coordinates of a corresponding tank x__i, y__i and its parameters a__i and w__i (0 ≤ a__i ≤ 2π, 0 ≤ w__i ≤ 100). Numbers a__i and w__i contain at most 5 digits after the decimal point. All coordinates are integers and their absolute values do not exceed 105. Enemy tanks can rotate a turret in the clockwise as well as in the counterclockwise direction at the angular speed of not more than w__i. It is guaranteed that each of the enemy tanks will need at least 0.1 seconds to aim at any point of the segment AB and each of the enemy tanks is posistioned no closer than 0.1 meters to line AB. On the last line is given the number k (0 ≤ k ≤ n).

第一行包含 4 个数——点 AA 和点 BB 的坐标(单位:米),且两点不重合。
第二行给出一个整数 nn(1≤n≤1041 \leq n \leq 10^4),表示敌方坦克的数量。
接下来的 nn 行,每行包含一辆敌方坦克的坐标 xi, yix_i,\,y_i 及其参数 aia_i 和 wiw_i(其中 0≤ai≤2π0 \leq a_i \leq 2\pi,0≤wi≤1000 \leq w_i \leq 100)。
数值 aia_i 和 wiw_i 最多保留 5 位小数。所有坐标的绝对值均不超过 10510^5,且均为整数。
敌方坦克的炮塔可顺时针或逆时针旋转,最大角速度为 wiw_i。
保证每辆敌方坦克瞄准线段 ABAB 上任意一点所需时间至少为 0.10.1 秒,且每辆敌方坦克到直线 ABAB 的距离均不小于 0.10.1 米。
最后一行给出一个整数 kk(0≤k≤n0 \leq k \leq n)。

输出格式

Print a single number with absolute or relative error no more than 10 - 4 — the minimum required speed of Pedalny in meters per second.

输出一个数字(绝对或相对误差不超过 10−410^{-4})——Pedalny 所需的最小速度(单位:米/秒)。

输入输出样例

  • 输入#1

    0 0 10 0
    1
    5 -5 4.71238 1
    0

    输出#1

    4.2441
  • 输入#2

    0 0 10 0
    1
    5 -5 4.71238 1
    1

    输出#2

    0.0000

输入解题思路,AI测评打分。不知道怎么写?

首页