-
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
-
利用VC++制作出按扭,并在起上面着色.实现点击后按扭着色.
利用VC++制作出按扭,并在起上面着色.实现点击后按扭着色.-Use VC++ Create button, and shading from above. Realization click button coloring.
- 2022-03-09 14:40:14下载
- 积分:1
-
一个java + SQL2000开发的超市销售系统,增删…
一个java+sql2000开发超市销售系统,实现货品增删改查等管理。-A java+ Sql2000 development of supermarket sales system, additions and deletions to search such as goods management.
- 2022-12-27 17:55:03下载
- 积分:1
-
VC++ 6.0一些基础控件使用的例子!Good luck!谢谢~
VC++ 6.0一些基础控件使用的例子!Good luck!谢谢~-VC++ 6.0 controls the use of some basic examples! Good luck! Thank you ~
- 2022-07-09 18:45:10下载
- 积分:1
-
利用这个程序可以让你方便的管理你所收集的源程序,VBCODE网站50几周来排行第一的源程序。强烈推荐! (200KB)...
利用这个程序可以让你方便的管理你所收集的源程序,VBCODE网站50几周来排行第一的源程序。强烈推荐! (200KB)-Take advantage of this program allows you to facilitate the management of the source you collected, VBCODE website ranking, the first 50 weeks of the source. Strongly recommend! (200KB)
- 2022-05-13 20:20:46下载
- 积分:1
-
a sample of Calculator for wm
一个简单的windows moblie c#计算器例子-a sample of Calculator for wm
- 2022-07-03 00:09:13下载
- 积分:1
-
surf算法
surf算法的源码实现~~~主要介绍 SIFT 算法。希望通过对 SIFT 算法的总结来更加深入地了解“尺度不变特征变换”,除此之外,也加深来对 SURF 算法的理解。
- 2022-04-12 07:22:42下载
- 积分:1
-
mathematical curve examples, see oh
数学曲线的实例,可以看看哦-mathematical curve examples, see oh
- 2022-05-19 19:09:37下载
- 积分:1
-
挑战你的心理极限…… 建议不要再夜间独自观看……否则后果自负。...
挑战你的心理极限…… 建议不要再夜间独自观看……否则后果自负。-Challenge your mental limits ... ... We do not recommend re-watching alone at night ... ... or else your peril.
- 2022-03-15 15:50:15下载
- 积分:1
-
DELPHI宿舍管理系统
DELPHI宿舍管理系统-quarters Delphi Management System
- 2022-01-25 22:29:42下载
- 积分:1