In this code I minimize the difference between prefix sums only, but don't consider the difference of indexes. I think there might be test where prefix sums difference is bigger, but indexes difference is small, and it can be answer.
Why does this code work?
In this code I minimize the difference between prefix sums only, but don't consider the difference of indexes. I think there might be test where prefix sums difference is bigger, but indexes difference is small, and it can be answer.