-
vb programming, computer graphics
vb编程,计算机图形学-vb programming, computer graphics
- 2022-01-24 16:18:18下载
- 积分:1
-
算法实现题2
算法实现题2-3 邮局选址问题
« 问题描述:
在一个按照东西和南北方向划分成规整街区的城市里,n个居民点散乱地分布在不同的
街区中。用x 坐标表示东西向,用y坐标表示南北向。各居民点的位置可以由坐标(x,y)表示。
街区中任意2 点(x1,y1)和(x2,y2)之间的距离可以用数值|x1-x2|+|y1-y2|度量。
居民们希望在城市中选择建立邮局的最佳位置,使n个居民点到邮局的距离总和最小。
« 编程任务:
给定n 个居民点的位置,编程计算n 个居民点到邮局的距离总和的最小值。
« 数据输入:
由文件input.txt 提供输入数据。文件的第1 行是居民点数n,1£ n£ 10000。接下来n 行
是居民点的位置,每行2 个整数x 和y,-10000£ x,y£ 10000。
« 结果输出:
程序运行结束时,将计算结果输出到文件output.txt 中。文件的第1 行中的数是n 个居
民点到邮局的距离总和的最小值。
输入文件示例 输出文件示例
input.txt output.txt
5
1 2
2 2
1 3
3 -2
3 3
10
- 2022-08-26 13:24:17下载
- 积分:1
-
Users can visit a number of interesting figure deal, and the common denominator,...
用户登陆后可以对数字进行一些有趣的处理,求最大公约数,最小公倍数,同构数,水仙花数和进行数制转换-Users can visit a number of interesting figure deal, and the common denominator, least common multiple, the number of isomorphism, a few daffodils and a few system conversion
- 2023-01-10 05:00:04下载
- 积分:1
-
通过广度优先算法寻找迷宫(nSize*nSize)的最优路径。
通过广度优先算法寻找迷宫(nSize*nSize)的最优路径。-breadth- first through the maze to find algorithm (nSize* nSize) the optimal path.
- 2023-03-01 22:45:03下载
- 积分:1
-
Joseph Central issues
约瑟夫环问题,数据结构实验题目实验一 线性表应用-Joseph Central issues
- 2022-02-21 12:47:07下载
- 积分:1
-
一个简化GDI写法的程序
一个简化GDI写法的程序-A simplified CDI program
- 2022-08-25 17:23:38下载
- 积分:1
-
crawls from specific documents you need the link to a vbs script, the need to us...
从特定文件抓取你所需要的链接的一个vbs脚本,需要使用正则表达式-crawls from specific documents you need the link to a vbs script, the need to use regular expression
- 2022-07-01 04:43:21下载
- 积分:1
-
GPS positioning system, it can search or query detailed address associating with...
GPS定位系统,能够配合GPS搜索或查询详细的地址-GPS positioning system, it can search or query detailed address associating with GPS.
- 2022-01-22 04:50:17下载
- 积分:1
-
个人简介参考实现1.1的最终版本(JSR
Personal Profile Reference Implementation 1.1 Final Release(JSR-216)
- 2022-02-22 12:29:59下载
- 积分:1
-
这是一个实现电子签章的程序,在Visual C++6.0环境中编译通过,打开看看,一定会觉得很有意思:)...
这是一个实现电子签章的程序,在Visual C++6.0环境中编译通过,打开看看,一定会觉得很有意思:)-This is a realization of electronic signature procedure in the Visual C Compiler 6.0 environment through, open look, we will find it very interesting :)
- 2022-07-08 04:23:03下载
- 积分:1