-
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
-
digital control system
digital control system
- 2022-02-07 21:40:33下载
- 积分:1
-
算数表达式求值程序,这个是我自己编的,很好用,应该处理有限的字符,最后要以“#”号结束符。...
算数表达式求值程序,这个是我自己编的,很好用,应该处理有限的字符,最后要以“#”号结束符。-count expression evaluates procedures, this is my own series, useful, should address the limited character, Finally to "#" endings.
- 2022-08-16 02:10:39下载
- 积分:1
-
全英文的系统,能够完成家庭财务系统的大部分功能,提供友好界面,全vc++制作...
全英文的系统,能够完成家庭财务系统的大部分功能,提供友好界面,全vc++制作-A pure English system, providing most family finacial system functions with friendly interface and totally written in VC++.
- 2022-01-25 18:08:46下载
- 积分:1
-
C# 中实现的注册,适用于初学者的练习。
C# 中实现的注册,适用于初学者的练习。-C# realization of registration, applicable to beginners exercises.
- 2022-02-03 19:22:32下载
- 积分:1
-
利用Visual Basic编写的小程序,在些程序中阅览电子书,有奥林匹克知识,有谜语...
利用Visual Basic编写的小程序,在些程序中阅览电子书,有奥林匹克知识,有谜语-The use of Visual Basic procedures for the preparation of the small, in these proceedings to read e-books, there is the Olympic knowledge, there is a riddle ... ...
- 2022-03-03 02:39:29下载
- 积分:1
-
MCI' s application examples, including the play WAV, MIDI files and play the...
MCI的应用示例,包括播放WAV、MIDI文件和播放CD及将CD中的曲目转录为WAV文件等 -MCI" s application examples, including the play WAV, MIDI files and play the CD in the CD and the tracks transcribed into WAV files
- 2022-04-15 08:25:41下载
- 积分:1
-
VB环境一款扫描端口的软件很适合新手学习使用的
VB环境一款扫描端口的软件很适合新手学习使用的 -VB environment, a port scanning software is studying the use of suitable new
- 2023-05-29 11:40:04下载
- 积分:1
-
用 c# 使用 WMI 的示例
WMI 使用 C# 与 Windows 窗体的样本。
Connector.cs,启动连接器到同一主机的客户端。
- 2022-12-29 23:10:03下载
- 积分:1
-
此程序是一个迷宫的小游戏,只要用键盘的方位键就可以控制。...
此程序是一个迷宫的小游戏,只要用键盘的方位键就可以控制。-This procedure is a little game of a maze, it can be controlled with the position key of the keyboard.
- 2022-02-12 10:29:25下载
- 积分:1