Help for this page
#!/usr/bin/perl ... path($r+1, $c), path($r+1, $c+1) : $d[$r][$c] }
1 + 2 + 4 + 1