-
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
-
vb6 程序运行时像设计时一样可以自由移动和调整大小
自创的源码,跟设计时一样的拖动和调整的效果!
- 2022-11-06 14:40:03下载
- 积分:1
-
本程序是实现 wav格式转化为pcm的c++程序 附带测试程序 能成功运行...
本程序是实现 wav格式转化为pcm的c++程序 附带测试程序 能成功运行-This program is to achieve wav format into a pcm in c++ program that comes with test programs can be run successfully
- 2022-01-28 08:56:40下载
- 积分:1
-
这些程序可以解决第一和二次多项式方程。它能使我…
These program can solve first and second degree polynomial equation. It evens works when the roots are complex numbers(when delta is a negative value).
- 2022-07-18 16:38:23下载
- 积分:1
-
ARM Embedded WINCE Practice Guide, using JXARM9
ARM嵌入式WINCE实践教程,采用JXARM9-2410作为实验平台-ARM Embedded WINCE Practice Guide, using JXARM9-2410 as an experimental platform
- 2022-03-20 20:58:41下载
- 积分:1
-
Multi
多线程socket文件传输/支持断点续传/收发消息/点对多点-Multi-threaded socket file transfer/support HTTP/send and receive messages/to-multipoint
- 2022-11-16 23:00:03下载
- 积分:1
-
贪吃蛇游戏
贪吃蛇游戏 win32项目编译 非MFC程序
*游戏制作思想:
*通过一个二维数组来描述画面,
*-2代表墙,0代表空白,0以上代表蛇
*例以1,2,3,4表示蛇(4为蛇头)
*其移动时,数字依次减一,
*并在将要去的位置设为4,
*则完成了蛇的移动
*同时利用多线程获取按键事件,
*使屏幕绘制与按键监听同时进行
*/
- 2022-01-27 17:14:38下载
- 积分:1
-
stream driver functions
最基本的流驱动接口函数,以及几个相关的配置文件,可以供初学者参考-stream driver functions
- 2022-02-24 23:41:37下载
- 积分:1
-
Basketball game client and server
篮球比赛显示端和服务器端的计分和时间上的同步等功能。-Basketball game client and server-side shows the points and time synchronization functions.
- 2022-12-10 14:05:03下载
- 积分:1
-
This program provide the demand of error information,you can get error descripti...
提供windows错误信息的查询,输入错误号可以找出错误描述,对分析错误有很大帮助。-This program provide the demand of error information,you can get error description by input error number,it is helpful for error analysis
- 2022-02-10 06:38:37下载
- 积分:1