The question link: http://www.spoj.com/problems/LINE/ I have trouble getting the first sample I/O correct. My approach is similar to TSP. Do I misunderstand the problem?
Never mind, got Accepted.