#P1915. [NOI2010] 成长快乐

    ID: 866 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 9 上传者: 标签>动态规划,dp贪心2010NOI 系列提交答案Special Judge随机贪心,随机化

[NOI2010] 成长快乐

Output Format

For the given 1010 input files nemo1.in \sim nemo10.in, you need to submit the corresponding output files nemo1.out \sim nemo10.out.

The first line of the output file contains an integer kk, indicating that in your growth plan, Nemo will eat kk shrimps.

The second line contains a real number ww, indicating the total weight of shrimps that Nemo eats in your plan.

The next kk lines each contain 44 numbers t,x,y,st, x, y, s. This means that at time tt, Nemo eats shrimp numbered ss at position (x,y)(x, y). Here t,x,yt, x, y are real numbers, and ss is an integer.

To ensure the precision of the checker, it is recommended to output all real numbers with at least 66 digits after the decimal point. In the checker, two real numbers are considered equal if their absolute difference does not exceed 10410^{-4}.

5 1 6 0 0
1
5 2 2 0 0

1
5
5 2 2 1

Hint

Sample explanation

In this sample, Nemo eats shrimp 11 at position (2,2)(2, 2) at time 55. In fact, Nemo could reach (2,2)(2, 2) earlier, but the problem only requires that the speed not exceed VV.

Scoring

For each dataset, we set 99 scoring thresholds a10,a9,,a2a_{10}, a_9, \ldots, a_2. If your output is invalid, you get zero points. Otherwise, let the increase in Nemo’s weight in your plan be wuserw_{user}. Your score is determined by the following table:

Score Condition Score Condition
10 wusera10w_{user} \geq a_{10} 5 wusera5w_{user} \geq a_5
9 wusera9w_{user} \geq a_9 4 wusera4w_{user} \geq a_4
8 wusera8w_{user} \geq a_8 3 wusera3w_{user} \geq a_3
7 wusera7w_{user} \geq a_7 2 wusera2w_{user} \geq a_2
6 wusera6w_{user} \geq a_6 1 wuser>0w_{user} \gt 0

How to use the checker

In the checker directory, run ./checker in out in the terminal.

Here, in is the input file provided by the problem, and out is your answer file for that input.

The checker only verifies the validity of your output. Final results are subject to the online judge.

Thanks to @FlierKing for providing the SPJ and to @虞皓翔 for helping improve the SPJ.

Translated by ChatGPT 5