Location:
Search - Dist
Search list
Description: 对于给定的m 个整数a 1 , a 2,… a i …a m 组成的向量A, |a i | <=m,和另一个由n个整数 组成的向量B, b1 , b 2,… b i… b n |bi | <=n,试设计一个O (m+n) 时间算法,
计算给定向量A和B的距离dist
Platform: |
Size: 834 |
Author: 王八 |
Hits:
Description: uClinux-dist-20040408-str710-patch
Package of uClinux for STR71x
uClinux Driver for str71x
Platform: |
Size: 76330 |
Author: 45465 |
Hits:
Description: 用TCP/IP进行网际互连这本书得源代码,偶得,希望大家喜欢.推荐下载-using TCP/IP internetworking this book in the source code, even in the hope that everyone likes. Download
Platform: |
Size: 614400 |
Author: 魏俊杰 |
Hits:
Description: Douglas Comer,《用TCP/IP进行网际互连 第3卷:客户机-服务器编程和应用(第2版)》 或其英文版 Internetworking With TCP/IP Vol III: Client-Server Programming And Application (Second Edition) 整书源码-err
Platform: |
Size: 63488 |
Author: 阎利 |
Hits:
Description: 对于给定的m 个整数a 1 , a 2,… a i …a m 组成的向量A, |a i | <=m,和另一个由n个整数 组成的向量B, b1 , b 2,… b i… b n |bi | <=n,试设计一个O (m+n) 时间算法,
计算给定向量A和B的距离dist-For a given integer m of a 1, a 2, ... ai ... am composed of vector A, | ai | <= m, and another by an integer n-vector composed of B, b1, b 2, ... bi ... bn | bi | <= n, try to design a O (m+ n) time algorithm to calculate the amount of A and B orientation the distance dist
Platform: |
Size: 1024 |
Author: 王八 |
Hits:
Description: uClinux-dist-20040408-str710-patch
Package of uClinux for STR71x
uClinux Driver for str71x
Platform: |
Size: 75776 |
Author: 45465 |
Hits:
Description: 在 LPC2200 上的UCLINUX
移植补丁-In the LPC2200 uCLinux patch graft
Platform: |
Size: 29696 |
Author: 何俊德 |
Hits:
Description: 图像间距离测量可以轻松实现,还有大量源码可共分享-Measuring the distance between images can be easily achieved, there are a large number of source code can be a total share
Platform: |
Size: 2048 |
Author: 智谦 |
Hits:
Description: hibernate-distribution-3.3.1.GA-dist.zip源码-hibernate-distribution-3.3.1.GA-dist.zip source
Platform: |
Size: 31462400 |
Author: brown |
Hits:
Description: 距离函数用于计算两个矩阵之间的距离-Distance function used to calculate the distance between two matrices
Platform: |
Size: 1024 |
Author: ll |
Hits:
Description: 在FPGA上移植操作系统时用到的补丁,建立交叉编译环境NIOS2-GCC的补丁-PATCH
Platform: |
Size: 74752 |
Author: dxl |
Hits:
Description: 问题描述:
给定m个整数组成的向量A, , ,和另一个由n个整数1 2 , , , m a a L a i a ≤m 1≤ i ≤m
组成的向量B, , 。向量A和B之间的距离dist定义为: 1 2 , , , n b b L b i b ≤ n 1≤ i ≤ n
( ) { }。1 ,1
, min i m j n i j
dist A B a b
≤ ≤ ≤ ≤
= −
向量距离问题要求给定向量A和B的距离。
例如,当m=5,n=5,相应向量A为:(-5,3,-5,2,4),向量B为:(-2,-3,-2,-3,-1)
时,dist(A, B) = 2。
编程任务:
对于给定的m 个整数组成的向量A, , ,和另一个由n 1 2 , , , m a a L a i a ≤m 1≤ i ≤m
个整数组成的向量B, , ,试设计一个O(m + n)时间算法,计1 2 , , , n b b L b i b ≤ n 1≤ i ≤ n
算给定向量A和B的距离。
数据输入:
由文件input.txt提供输入数据。文件的第1行有2个正整数m和n。第2行是整数向量A:
。第3行是整数向量B: 。1 2 , , , m a a L a 1 2 , , , n b b L b
结果输出:
程序运行结束时,将计算出的向量A和B的距离输出到output.txt中。
输入示例输出示例
input.txt output.txt
5 5
-5 3 -5 2 4
-2 -3 -2 -3 -1
2-Problem description:
A given integer m, composed of a vector A,,, and another by the n integers 1 2,,, maa L aia ≤ m 1 ≤ i ≤ m
Vector composed of B,,. Vector between A and B is defined as dist from: 1 2,,, nbb L bib ≤ n 1 ≤ i ≤ n
() (). 1, 1
, Min i m j n i j
dist A B a b
≤ ≤ ≤ ≤
=--
Vector directed away from the issue of the volume of requests to the distance between A and B.
For example, when m = 5, n = 5, corresponding to vector A: (-5,3,-5,2,4), vector B is: (-2,-3,-2,-3,-1)
When, dist (A, B) = 2.
Programming tasks:
For a given integer m, composed of a vector A,,, and another by the n 1 2,,, maa L aia ≤ m 1 ≤ i ≤ m
Integral component of the vector B,,, try to design a O (m+ n) time algorithm, namely 1 2,,, nbb L bib ≤ n 1 ≤ i ≤ n
Directional traffic count to the distance between A and B.
Data entry:
Provided by the input data file input.txt. Line 1 of the document are two positive integers m and n. Line 2 is an integer vector A:
. Line 3 is an integer vector
Platform: |
Size: 776192 |
Author: skyalone |
Hits:
Description: darkstar 客户端程序 (mmo)-darkstar client (mmo)
Platform: |
Size: 724992 |
Author: xzrw |
Hits:
Description: JTDS驱动,好用的sql server驱动程序哦-sdfsofjesfjsljflsjfdsljfslfjsljflsjflsjfljdslfs
Platform: |
Size: 527360 |
Author: rogers |
Hits:
Description: samples-dist在做网站过程中的应用手册,具体的示例,应用的有事好处-samples-dist in the process of doing site' s user manual, specific examples of the benefits of application of emergency
Platform: |
Size: 7499776 |
Author: 杜建伟 |
Hits:
Description: JAVA连接数据库的驱动,对想要连接数据库的朋友很有帮助-data base manger system
Platform: |
Size: 535552 |
Author: 梁灵辉 |
Hits:
Description: 用于java开发中连接sql server数据库的驱动。-Java connection to sql server database development drive.
Platform: |
Size: 535552 |
Author: tianzhiya |
Hits:
Description: 开车从起始点A到目的地B的路线有多条。给你一张描述待选路线的表(n*n的矩阵A),让你找出行车距离最短的路线。表中表示了任意两个路口的连通情况,以及距离。矩阵元素a(i,j)=0表示路口i,j不连通,a(i,j)!=0表示路口i,j的行车距离。其中起始点A在路口1,目的地B在路口n 。完成源程序DIST.CPP中Dijkstra函数的编写。-A drive to the destination from a starting point a number of B' s line. Give you a description of the table to be selected routes (n* n matrix A), allows you to find the shortest travel distance routes. Table represents the connectivity of any two junctions, as well as distance. Matrix elements a (i, j) = 0 that junction i, j are not connected, a (i, j)! = 0 that junction i, j of the driving distance. A 1 at the junction where the starting point, destination B at the intersection n. Complete source DIST.CPP function in the preparation of Dijkstra.
Platform: |
Size: 1024 |
Author: fuyuqi |
Hits:
Description: 在linux下的LDA算法, 用于数据挖掘,可直接编译运行。-In linux the LDA algorithm for data mining, can be directly run the compiler.
Platform: |
Size: 28672 |
Author: yong |
Hits:
Description: ajaxrequest-dist.rar ajax JS 类-ajaxrequest-dist.rar ajax JS
Platform: |
Size: 2048 |
Author: 王雷 |
Hits:
« 12
3
4
5
6
7
8
9
10
...
16
»