시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 6 | 1 | 1 | 16.667% |
As Chief Bureaucrat at Missile Command, it has recently come to your attention that the existing performance guidelines do not sufficiently penalize frivolous use of expensive ammunition. Therefore, you must write a new battle summary analysis tool which takes into account excess ammunition consumption during battle.
A battle consists of the following elements:
Performance is evaluated on a simple point scale. The performance criteria are as follows:
Input will be given in the following format (legend follows):
nb nm mx my mdx mdy mt ... ns sx sy st ... ...
In the following legend, indentation denotes repetition of the indented block a number of times equal to the value of the preceding input item:
For each battle, output a line containing the score for that battle.
2 2 4.0 8.0 0.0 -1.0 0.0 4.0 8.0 1.0 -1.0 0.0 1 4.0 4.0 3.0 3 4.0 10.0 0.0 -1.0 0.0 5.0 10.0 3.0 -6.0 4.0 13.0 10.0 -3.0 -5.0 4.0 3 4.0 5.0 3.0 7.0 8.0 4.0 9.0 4.0 4.0
-4 -17