CF1208E Let Them Slide
Description
You are given $ n $ arrays that can have different sizes. You also have a table with $ w $ columns and $ n $ rows. The $ i $ -th array is placed horizontally in the $ i $ -th row. You can slide each array within its row as long as it occupies several consecutive cells and lies completely inside the table.
You need to find the maximum sum of the integers in the $ j $ -th column for each $ j $ from $ 1 $ to $ w $ independently.
Optimal placements for columns $ 1 $ , $ 2 $ and $ 3 $ are shown on the pictures from left to right.Note that you can exclude any array out of a column provided it remains in the window. In this case its value is considered to be zero.
Input Format
N/A
Output Format
N/A
Explanation/Hint
Illustration for the first example is in the statement.