Description: On a plane there are n (1 < = n < = 100000) villages, each village by the coordinates (xi, yi) labeling position,-10 ^ 9 < = xi, yi < = 10 ^ 9. Now we want to build a post office, so get the distance of the villages and the shortest. In this problem, the distance is defined as the Manhattan distance, the distance point i and the point j is equal to | xi-xj |+ | yi-yj | Entry: the first acts of n, n represents the number of villages in the next row per line Two integer that represents a village coordinates output: a number that represents the establishment of post offices to various villages and Sample Input: 3 0 0 10 10 0 10 Sample Output: 20 Tips: village post office and coordinate all necessarily integer for over int numbers, please use long long, input and reading lld
To Search:
File list (Check if you may need any files):
main.c
地图上的邮局.dev
地图上的邮局.layout