407596: GYM102835 L Save lives or money

Memory Limit:1024 MB Time Limit:3 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

L. Save lives or moneytime limit per test3 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard outputExamplesInput
20
1 2 1
0 0 20 20
20 20 0 20
0 20 0 0
10 15 100
Output
200.0 100 1 1
1
Input
100
5 5 5
0 10 10 0
0 0 0 10
0 0 10 0
0 0 -10 0
0 0 -5 5
0 -10 -10 0
-10 0 -5 5
0 10 -5 5
10 0 0 -10
0 0 0 -10
3 3 5
-5 3 1
-3 5 1
-3 -3 1
3 -3 10
Output
100.0 15 2 2
1 3
Input
33
3 17 3
-4 4 5 4
-4 3 -3 3
3 -3 4 -3
0 1 0 -1
-4 3 -4 -3
-3 -2 -3 3
-2 2 -2 -1
2 1 2 -2
3 2 3 -3
4 3 4 -3
-3 3 4 3
-2 2 3 2
-2 -1 0 -1
0 1 2 1
-3 -2 2 -2
-4 -3 3 -3
-4 -4 5 -4
-4 -4 -4 -3
-4 3 -4 4
5 -4 5 4
1 0 5
-1 0 1
-1 0 1
Output
48.0 5 1 2
1 3

加入题单

算法标签: