3 3 8
1 1 1 2 5
1 1 2 1 3
1 2 2 2 5
2 1 2 2 2
2 2 2 3 1
2 2 3 2 6
2 3 3 3 4
3 2 3 3 7
INPUT DETAILS:
The grid is as follows:
*--5--* . . *
| |
3 5 :
| |
*--2--*--1--*
| |
: 6 4
| |
* . . *--7--*
7
Consider the two edges coming out of (2,2), at most 6+1=7 units of hay can
be transported. This is indeed feasible.