AOJ 0034 Railway Lines: changed to use Array#last of cumulative sums instead of Array#reduce