• + 0 comments

    Consider this test case:

    2, 1

    0

    10

    In this test case, for any point from 0 up to 10 the sum of the moves will be 10. If you pick 0, then the one that starts with 10 does 10 moves. If you start with 10, then the one that starts at 0 does 10 moves. If you pick 5, then each one moves 5. There are more answers that all sum to 10, but only 0 is acceptable because it is the one that provides the lexicographically smallest set of coordinates.