-
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
-
著名的TCPMP,现在已经不再开源,这是商业化之前源码,很难得...
著名的TCPMP,现在已经不再开源,这是商业化之前源码,很难得-Famous TCPMP, is no longer open source, which is before the commercial source, it is difficult to get
- 2022-03-23 03:57:03下载
- 积分:1
-
This program can be used to catch the screen image, which can be used as wall pa...
可以把屏幕内容捕捉下来,用在制作墙纸方面 ,相当于print screen键-This program can be used to catch the screen image, which can be used as wall paper. This function equals to "print screen" key.
- 2022-10-11 00:45:02下载
- 积分:1
-
大气外贸灯具网站PHP源码
大气外贸灯具网站PHP源码。安装请先删除Home 文件下的install.lock 填上自己的服务器就可以安装了
- 2022-02-22 04:27:05下载
- 积分:1
-
dll formula (2) can change their own
dll程式(二) 可以自己修改-dll formula (2) can change their own
- 2022-05-19 12:26:50下载
- 积分:1
-
这是最好的代码为您最佳选择
this the best code for you best choice -this is the best code for you best choice
- 2023-04-03 03:20:03下载
- 积分:1
-
under the DOS operating procedures, functions very powerful, case
在DOS下的操作程序,功能非常强大,不区分大小写,文字不可重命名
- 2022-04-30 00:20:51下载
- 积分:1
-
本程序用于列出当前所有进程的全路径名,然后输出
本程序用于列出当前所有进程的全路径名,然后输出-The procedures for all processes listed in the current full-path name, and then output
- 2022-12-28 06:35:03下载
- 积分:1
-
Enter the code on the implementation of the static compression, and compressed t...
实现对输入代码的静态压缩,并将压缩结果存入文件,计算出压缩率.-Enter the code on the implementation of the static compression, and compressed the results into the paper to calculate the compression ratio.
- 2022-08-24 18:17:35下载
- 积分:1
-
服务匹配代码
服务匹配代码
服务匹配代码
服务匹配代码
服务匹配代码
服务匹配代码-Matching Service code
- 2022-04-27 17:07:53下载
- 积分:1