文件名称:c
-
所属分类:
- 标签属性:
- 上传时间:2015-12-17
-
文件大小:31kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
问题描述
有多个可供选择的村庄坐落在笔直的高速公路旁。高速公路被表示为一个整数轴,每个
村庄有一个整数坐标表示其位置。两个村庄不会在同一个位置。在两个位置之间的距离是其
整数坐标的差的绝对值。
现在要选择一些村庄,在这些村庄里建小学。小学位置的选择应该使每个村庄和离该村
庄最近的小学之间的距离的总和最小。注意小学只能建立在某个村庄,小学的位置视为该村
庄的位置。
实验任务
请你写一个程序,给出的村庄的位置和要建立的小学的数量,计算每个村庄和它最近的
小学之间的距离尽可能少的总和。-Problem Descr iption
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.
有多个可供选择的村庄坐落在笔直的高速公路旁。高速公路被表示为一个整数轴,每个
村庄有一个整数坐标表示其位置。两个村庄不会在同一个位置。在两个位置之间的距离是其
整数坐标的差的绝对值。
现在要选择一些村庄,在这些村庄里建小学。小学位置的选择应该使每个村庄和离该村
庄最近的小学之间的距离的总和最小。注意小学只能建立在某个村庄,小学的位置视为该村
庄的位置。
实验任务
请你写一个程序,给出的村庄的位置和要建立的小学的数量,计算每个村庄和它最近的
小学之间的距离尽可能少的总和。-Problem Descr iption
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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
c/
c/cover.c
c/cover.exe
c/cover.o
c/locate.c
c/locate.exe
c/locate.o
c/sum.c
c/xxxzwt.c
c/xxxzwt.exe
c/xxxzwt.o
c/cover.c
c/cover.exe
c/cover.o
c/locate.c
c/locate.exe
c/locate.o
c/sum.c
c/xxxzwt.c
c/xxxzwt.exe
c/xxxzwt.o
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.