1000点問題

In this problem we are going to model the ripples formed when you
drop rocks in the water. When a rock is dropped in the water large
ripples form around the rock that gradually decrease as they move
away. Let's say you drop a 4 pound rock in the water at time 0 at
location (5,3). At time 0 there will be a level 4 ripple where the
rock was dropped. At time 1 there will be a level 3 ripple surrounding
the rock. At time 2 there will be a level 2 ripple surrounding where
the level 3 ripple was. This goes on until time 4 where there will
no longer be a ripple:

Input format: Weight Time X Y
rocks = {"4 0 5 3"}

   Time 0         Time 1        Time 2        Time 3        Time 4  
 0123456789     0123456789    0123456789    0123456789    0123456789
0..........    0..........   0..........   0..1111111.   0..........
1..........    1..........   1...22222..   1..1.....1.   1..........
2..........    2....333...   2...2...2..   2..1.....1.   2..........
3.....4....    3....3.3...   3...2...2..   3..1.....1.   3..........
4..........    4....333...   4...2...2..   4..1.....1.   4..........
5..........    5..........   5...22222..   5..1.....1.   5..........
6..........    6..........   6..........   6..1111111.   6..........

When many ripples occupy the same location at a particular time, the
level of the ripple at that location is the sum of all the ripples
occupying that location:
rocks = {"3 0 3 2","2 1 7 2","3 0 3 4","1 2 8 5"}

   Time 0         Time 1        Time 2        Time 3    
 0123456789     0123456789    0123456789    0123456789  
0..........    0..........   0.11111....   0..........
1..........    1..222.....   1.1...1111.   1..........
2...3......    2..2.2..2..   2.211121.1.   2..........
3..........    3..444.....   3.2...2111.   3..........
4...3......    4..2.2.....   4.21112....   4..........
5..........    5..222.....   5.1...1..1.   5..........
6..........    6..........   6.11111....   6..........

Note that the ripples maintain their path even if they collide.
Given the weight, times, and locations of the dropped rocks, determine
the highest ripple level that will occur before all of the ripples
have died out. Disregard locations that have negative coordinates when
checking for ripple levels. In both of the examples above, the highest
ripple value was 4.  

Definition

Class:
DropRocks
Method:
maxWave
Parameters:
String[]
Returns:
int
Method signature:
int maxWave(String[] rocks)
(be sure your method is public)

Constraints
-
rocks will contain between 1 and 50 elements inclusive.
-
Each element of rocks will be of the form (quotes for clarity):
"WEIGHT TIME X Y" where:
WEIGHT is an integer with no leading zeros between 1 and 250 inclusive.
TIME is an integer with no leading zeros between 0 and 1000 inclusive.
X is an integer with no leading zeros between 0 and 2000 inclusive.
Y is an integer with no leading zeros between 0 and 2000 inclusive.
-
Each element of rocks will not contain leading or trailing whitespace.

Examples
0)

{"4 0 5 3"}
Returns: 4
From above.

1)

{"3 0 3 2","2 1 7 2","3 0 3 4","1 2 8 5"}
Returns: 4
From above.

2)

{"1 0 0 0","1 1 0 0","1 2 0 0","1 3 0 0","1 4 0 0","1 5 0 0"}
Returns: 1

3)

{"250 0 0 0","250 0 100 100"}
Returns: 400