Description: Problem Description
There are multiple options villages situated beside the straight highway. Highway axis is represented as an integer, each
The village has a integer coordinates represent its position. Two villages will not be in the same position. The distance between the two positions is its
The absolute value of the difference between integer coordinates.
Now we want to a number of villages, built primary schools in these villages. Select the primary location should make every village and village
The sum of the minimum distance of the nearest village primary school between. Note that can only be built in a village primary school, primary school location deemed village
Location village.
Experimental task
You write a program, given the number of positions to be established villages and primary schools, calculated for each village and its nearest
The distance between the primary minimal sum.
To Search:
File list (Check if you may need any files):
c
.\cover.c
.\cover.exe
.\cover.o
.\locate.c
.\locate.exe
.\locate.o
.\sum.c
.\xxxzwt.c
.\xxxzwt.exe
.\xxxzwt.o