all city Lineland locate Ox coordinate axis Thus city associate position xi coordinate Ox axis no city locate single pointlineland resident love send letter a person send letter recipient live city live city easy drop instrange true cost sending letter exactly equal distance sender city recipient cityFor city calculate value mini maxi mini minimum cost sending letter ith city city maxi maximum cost sending letter ith city city