-
Description:
对整型有序关键码序列进行折半查找,待排序序列以数组存储。如果找到待查记录,返回找到的位置下标,并删除该关键码记录;如果没找到待查记...
Description:
对整型有序关键码序列进行折半查找,待排序序列以数组存储。如果找到待查记录,返回找到的位置下标,并删除该关键码记录;如果没找到待查记录,返回0,并将待查记录插入到适当位置,即该查找属于动态查找。输出查找过程中每一轮的low,mid,high 值,以及与给定值相比较的关键码值,并输出最后找到的位置,及变化后的数组。
注意:该数组为整型,数组中关键码存储位置为r[1]~r[n],r[0]留作它用,且关键码个数大于4.
Input Format:
第一行输入数组中记录个数n
第二行输入n个有序的整型关键码,以空格隔开
接下来输入三个待查关键码,每个关键码占一行
Output format:
对于每个关键码,分别输出:
找到给定值之前的每一轮的low,mid,high及相比较的待查找序列中的关键码,以空格隔开
接下来一行输出查找到的位置
接下来一行输出变化后的待查找序列
-Description:
The key codes for integers ordered sequence of binary search until the sorting sequence to an array of storage. If you find a complete set of records, returns to find the location of the next standard, and delete the key code is recorded if not find a complete set of records, returns 0, and a complete set of records inserted into the appropriate location, that is, the search was part of search. Find out the process for each one of the low, mid, high value, as well as compared to the value given the key code value and output of the last to find the locat
- 2023-05-15 19:40:03下载
- 积分:1
-
Trading software of amenities using visual basic
Trading software of amenities using visual basic
- 2022-01-28 16:16:07下载
- 积分:1
-
通过DDX(动态数据交换)选择文件
通过DDX(动态数据交换)选择文件-through DDX (dynamic data exchange) select files
- 2022-01-26 01:11:03下载
- 积分:1
-
windows底层的内存搜索
windows底层的内存搜索-windows bottom of the memory search
- 2023-08-31 14:15:03下载
- 积分:1
-
calculator, a simple calculation functions, vc programming reflects the benefits...
计算器,实现简单的计算功能,体现vc编程的好处!-calculator, a simple calculation functions, vc programming reflects the benefits!
- 2022-07-04 15:45:25下载
- 积分:1
-
一些WINCE的资料,介绍了WINCE的基本的、入门的资料。。。没基础的都来看看,懂点的就不要下了哈,资料都是小弟收集的...
一些WINCE的资料,介绍了WINCE的基本的、入门的资料。。。没基础的都来看看,懂点的就不要下了哈,资料都是小弟收集的-Some information WINCE introduced WINCE the basic, entry information. . . Without a solid foundation for all to see, understand, do not point down the Kazakhstan, information is collected by brother
- 2022-08-26 04:26:56下载
- 积分:1
-
vb编写的简单计算器程序,适合vb入门者看看,
vb编写的简单计算器程序,适合vb入门者看看,-vb write a simple calculator program, suitable for beginners vb look
- 2022-03-20 17:06:11下载
- 积分:1
-
山农定理得VC++ 完美程序。大家多多交流
山农定理得VC++ 完美程序。大家多多交流-Shannong theorem was VC++ Perfect procedures. U.S. more exchanges
- 2023-04-10 12:55:34下载
- 积分:1
-
印章实例代码
基于c + + 实现的印章代码。源码描述:
制作印章实例、 用到Graphics来根据设定的公司名称和用章信息绘制出一个圆章
来制作公司的公章,制作印章来说,主要是如何让字均匀的
显示在
- 2022-01-25 16:30:54下载
- 积分:1
-
wince 开发的udp 收发以太网数据包,直接使用无需修改。
wince 开发的udp 收发以太网数据包,直接使用无需修改。-wince development udp send and receive Ethernet data packets directly without modification.
- 2022-03-13 04:30:56下载
- 积分:1