射击场AI (CI翻译)
One warm and sunny day king Copa decided to visit the shooting gallery, located at the Central Park, and try to win the main prize — big pink plush panda. The king is not good at shooting, so he invited you to help him.
一个温暖晴朗的日子,Copa 国王决定去中央公园的射击场,试着赢得大奖——一只粉色的大号毛绒熊猫。国王射击技术不佳,于是邀请你来帮忙。AI (CI翻译)
The shooting gallery is an infinite vertical plane with Cartesian coordinate system on it. The targets are points on this plane. Each target is described by it's coordinates $*x*_{*i*}$, and $*y*_{*i*}$, by the time of it's appearance $*t*_{*i*}$ and by the number $*p*_{*i*}$, which gives the probability that Copa hits this target if he aims at it.
射击场是一个带有直角坐标系的无限竖直平面。目标是平面上的点。每个目标由坐标 $*x*_{*i*}$ 和 $*y*_{*i*}$、出现时间 $*t*_{*i*}$,以及数值 $*p*_{*i*}$ 描述,其中 $*p*_{*i*}$ 表示 Copa 瞄准该目标时击中它的概率。AI (CI翻译)
A target appears and disappears instantly, so Copa can hit the target only if at the moment $*t*_{*i*}$ his gun sight aimed at $(*x*_{*i*}, *y*_{*i*})$. Speed of movement of the gun sight on the plane is equal to 1. Copa knows all the information about the targets beforehand (remember, he is a king!). He wants to play in the optimal way, which maximizes the expected value of the amount of hit targets. He can aim at any target at the moment 0.
目标会瞬间出现并消失,因此只有在时刻 $*t*_{*i*}$,枪的瞄准点位于 $(*x*_{*i*}, *y*_{*i*})$ 时,Copa 才能击中该目标。瞄准点在平面上的移动速度为 1。Copa 事先知道所有目标的信息(毕竟,他可是国王!)。他希望采用最优策略,使击中目标数量的期望值最大化。时刻 0,他可以瞄准任意目标。AI (CI翻译)
Input
输入格式
AI (CI翻译)The first line contains integer $*n*$ ($1 ≤ *n* ≤ 1000$) — amount of targets in the shooting gallery. Then $*n*$ lines follow, each describing one target. Each description consists of four numbers $*x*_{*i*}$, $*y*_{*i*}$, $*t*_{*i*}$, $*p*_{*i*}$ (where $*x*_{*i*}$, $*y*_{*i*}$, $*t*_{*i*}$ — integers, $- 1000 ≤ *x*_{*i*}, *y*_{*i*} ≤ 1000, 0 ≤ *t*_{*i*} ≤ 10^{9}$, real number $*p*_{*i*}$ is given with no more than 6 digits after the decimal point, $0 ≤ *p*_{*i*} ≤ 1$). No two targets may be at the same point.
第一行包含一个整数 $*n*$ ($1 ≤ *n* ≤ 1000$),表示射击场中的目标数量。接下来 $*n*$ 行,每行描述一个目标。每条描述由四个数 $*x*_{*i*}$、$*y*_{*i*}$、$*t*_{*i*}$、$*p*_{*i*}$ 组成(其中 $*x*_{*i*}$、$*y*_{*i*}$、$*t*_{*i*}$ 均为整数,$- 1000 ≤ *x*_{*i*}, *y*_{*i*} ≤ 1000$,$0 ≤ *t*_{*i*} ≤ 10^{9}$;实数 $*p*_{*i*}$ 的小数位数不超过 6,$0 ≤ *p*_{*i*} ≤ 1$)。任意两个目标都不会位于同一点。AI (CI翻译)
Output
输出格式
AI (CI翻译)Output the maximum expected value of the amount of targets that was shot by the king. Your answer will be accepted if it differs from the correct answer by not more than $10^{ - 6}$.
输出国王击中目标数量的最大期望值。若你的答案与标准答案的误差不超过 $10^{ - 6}$,则会被接受。AI (CI翻译)
样例
1
0 0 0 0.5
0.5000000000
2
0 0 0 0.6
5 0 5 0.7
1.3000000000
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。