这题要在每一次输出后额外换一行,也就是说,即使你写的是 printf("Round trip does not exist.\n");
printf("Round trip does not exist.\n");
在后面也要另加一个 \n。这一点没有在样例中体现。
\n
而且,数组输出中最后一个元素右面不能有空格。UVA 的IO真的有鬼。