• + 0 comments

    The word "lexicographic" in this problem statement is very misleading. The standard definition of lexicographic is that the numbers are compared to each other in an alphabetical sense, as if the numbers were strings ([https://en.wikipedia.org/wiki/Lexicographical_order]). So a lexicographic comparison is the same as a numerical comparison if either number is positive. However if both numbers are negative, the comparison reverses, since the string '-1' is less than the string '-5'.

    The answer expected by the grader here is simply the minimum possible numerical value, for each dimension, that optimizes the total distance traveled.