F.A.Q
Hand In Hand
Online Acmers
Forum | Discuss
Statistical Charts
Problem Archive
Realtime Judge Status
Authors Ranklist

C/C++/Java Exams
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
Virtual Contests
DIY | Web-DIY beta
Recent Contests
Register new ID

# Missile Command

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 200    Accepted Submission(s): 3

Problem Description
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:

r = (1 每 (t 每 1)2)1/2

Performance is evaluated on a simple point scale. The performance criteria are as follows:

Input
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:
nb (0 < nb) 每 number of battles
nm (0 <= nm <= 20) 每 number of missiles
mx/my (0.0 < my) 每 initial missile position (in km)
mdx/mdy 每 missile velocity (in km/s)
mt (0.0 <= mt) 每 time since battle start of the missile's entrance (in seconds)
ns (0 <= ns <= 20) 每 number of shots
sx/sy (1.0 <= sy) 每 shot position at time of detonation (in km)
st (0.0 <= st) 每 time since battle start of the shot's detonation (in seconds)

Output
For each battle, output a line containing the score for that battle.

Sample Input
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

Sample Output
-4
-17

Source

Recommend
lcy

Statistic | Submit | Discuss | Note
 Home | Top Hangzhou Dianzi University Online Judge 3.0 Copyright © 2005-2020 HDU ACM Team. All Rights Reserved. Designer & Developer : Wang Rongtao LinLe GaoJie GanLu Total 0.015600(s) query 2, Server time : 2020-01-25 08:15:55, Gzip enabled Administration