Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
use 5.10.0;
|
||||
use List::Util 'max';
|
||||
|
||||
my @sum;
|
||||
while (<>) {
|
||||
my @x = split;
|
||||
@sum = ($x[0] + $sum[0],
|
||||
map($x[$_] + max(@sum[$_-1, $_]), 1 .. @x-2),
|
||||
$x[-1] + $sum[-1]);
|
||||
}
|
||||
|
||||
say max(@sum);
|
||||
Loading…
Add table
Add a link
Reference in a new issue