Sponsored
Use these hints if you're stuck. Try solving on your own first.
Calculate the minimal value of k by strategically designing a monovariant.
Construct the solution four rows at a time, going bottom up.
Solve with full IDE support and test cases