Multiple Answers with Same Input

I wonder if a problem can have more than one valid output for the same input, how would the solution be evaluated? For example, for the problem " Drag Racing" (Problem Code: DRGRAC), I believe track patterns of both “-||-” and “|–|” should be valid for the the first set of sample input (0 0, 2 0, 0 2, 2 2), and the problem does not specify why “-||-” should be chosen over “|–|”. If an algorithm gives “-||-” and another algorithm gives “|–|”, will both of them be evaluated as correct?

1 Like

In most of such cases, it is written in the question that “if multiple answers exist, then you can print any of the answers” . So, yes, all of them will be evaluated as correct.

1 Like