-
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
-
Intelligence Chat
这是一个用c语言编写的智能聊天程序。实际上,这个程序是一个巡回考试的测试,在这个测试中,使用聊天软件的人问其他人一些问题,前提是他们不知道对方是人还是机器。 ;使用此程序,用户可以与三个预定义的人进行虚拟聊天。所谓智能,是指软件能够识别问题中的悖论,并发送错误信息。例如,如果前一个问题是关于婚姻的,而答案是否定的,那么关于孩子数量的问题将被错误消息回答。 ;
- 2023-05-16 15:50:03下载
- 积分:1
-
using the data structure to map AOE method of calculation of critical path, this...
采用数据结构中的AOE方法对图的关键路径进行计算,此算法摘录了课本中的算法-using the data structure to map AOE method of calculation of critical path, this algorithm extracts from the books of Algorithm
- 2022-03-29 16:01:16下载
- 积分:1
-
this rar file for the developers of projects
this rar file for the developers of projects-this is rar file for the developers of projects
- 2022-03-19 21:51:11下载
- 积分:1
-
Research Institute in China Blocks AD conversion
研究研华模块得AD转换程序-Research Institute in China Blocks AD conversion
- 2022-08-16 14:29:51下载
- 积分:1
-
动态求两点间距离的程序,输入点坐标,用VC++编写
动态求两点间距离的程序,输入点坐标,用VC++编写-Dynamic distance between two points for the procedure, enter the point coordinates, with VC++ Prepared
- 2022-08-04 01:05:07下载
- 积分:1
-
EDA应用中内核CPU
EDA应用中内核CPU-CORE具体定义实例,供大家学习和写程序参考之用-EDA applications, the specific definition of the kernel CPU-CORE examples for everyone to learn and write programs for reference
- 2023-07-16 06:50:03下载
- 积分:1
-
好东西啊 大家多支持啊 传给大家分享关于UDP的原代码
好东西啊 大家多支持啊 传给大家分享关于UDP的原代码 -Good things ah ah to the U.S. to support the U.S. more than the sharing of information on the original UDP code
- 2023-02-23 17:55:04下载
- 积分:1
-
C++ Builder与Windows API经典范例
C++ Builder与Windows API经典范例-C Builder and Windows API classic model
- 2022-03-06 15:59:29下载
- 积分:1
-
简易的管理信息系统,采用连接模式访问数据源
简易的管理信息系统,采用连接模式访问数据源-managentInformationSystem
- 2023-03-24 12:25:03下载
- 积分:1