시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 12 | 0 | 0 | 0.000% |
In a fishing contest, the participants fish in a lake, represented as a 2D grid of dimension $r \times c$. Each integer point in the grid contains fish.
At point $(x, y)$, fish first appear at second $t_{x, y}$ and disappear just before time $t_{x, y} + k$ seconds. Outside of this time, no fish can be caught at this position. It takes no time to catch all the fish at a point, and all points contain the same amount of fish. Furthermore, moving to the point immediately north, west, south or east from the point you are currently at takes exactly $1$ second.
Assume that you start at some position $(x_0, y_0)$ at second $1$, and can catch fish until (and including) second $l$. From how many points in the lake can you catch fish, if you travel optimally on the lake?
The input consists of:
Output the maximum number of points you could catch fish from.
2 2 1 10 0 0 1 4 3 2
2
2 3 5 6 1 1 1 1 6 1 2 2
5
2 3 5 7 1 1 1 1 6 1 2 2
6
Contest > Swedish Coding Cup > LTH Challenge 2017 F번