>n; intr[n]; cout<<"输入整型数组r[n]各元素的值:"<>r[i]; }//输入数组r[n] CreatHeap(r,n);//建初堆 cout<<"将r[n]调整为大根堆-堆排序-c++ - IMDN开发者社群-imdn.cn" /> >n;intr[n];cout<<"输入整型数组r[n]各元素的值:"<>r[i];}//输入数组r[n]CreatHeap(r,n);//建初堆cout<<"将r[n]调整为大根堆,得:"<>k;//输入待删除的元素序号 Del(r,k,n);//删除第k个节点后重新调整堆,时间复杂度O(logn)cout<<"删除完毕"< >n;intr[n];cout<<"输入整型数组r[n]各元素的值:"<>r[i];}//输入数组r[n]CreatHeap(r,n);//建初堆cout<<"将r[n]调整为大根堆,得:"<>k;//输入待删除的元素序号 Del(r,k,n);//删除第k个节点后重新调整堆,时间复杂度O(logn)cout<<"删除完毕"<
登录
首页 » c++ » 堆排序

堆排序

于 2022-02-04 发布 文件大小:1.10 kB
0 102
下载积分: 2 下载次数: 1

代码说明:

堆排序算法,c++实现 主函数 int main(){ int n; cout

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • MsgChart
    说明:  可以使用消息进行控制的Chart图,使用MSChart 实现 。(You can use the Chart chart control messages, use MSChart achieve.)
    2010-04-12 14:50:44下载
    积分:1
  • new-EMG
    主要实现的功能是,从外部不断得到数据,然后在MFC建立的界面下进行分析,比如波形的分析,还有各种数学上的分析。这是一个成熟的程序,带有源码。(The main achievement of the function is to continue to get from the external data analysis, and then in the MFC interface created, such as waveform analysis, there are a variety of mathematical analysis. This is a mature program, with source code.)
    2013-03-17 15:01:26下载
    积分:1
  • C#底层服务框架
    分析了传统DSS的弊端,引出电子商务环境下的DSS应用新模式.针对原有决策电子市场的框架结构,进行相对的完善,给出了一个新决策电子市场模型,并分 析了新模式下完成一次交易事务的全过程.在此基础上,阐述了决策资源描述的重要性,并根据owl-s描述Web服务的框架,对电子市场中的DSS资源进行 针对性的描述.利用新市场模型和资源描述框架,可以有效完善市场功能并形成新模式下相对通用的DSS资源描述方案.
    2022-03-12 19:26:41下载
    积分:1
  • MP3encoder
    MP3 Encoder (Converts WAV to MP3)
    2020-06-20 01:40:01下载
    积分:1
  • NDIS
    实现透明加密,驱动模型,文件过滤系统介绍(To achieve transparent encryption, drive model, document filtering system introduced)
    2011-05-19 11:26:20下载
    积分:1
  • 网口通信(多线程)
    说明:  Socket通讯,多线程,有客户端服务器(Socket communication, multithreading, client server)
    2020-12-30 20:01:15下载
    积分:1
  • fir
    基于CCS工具,运用matlab和c语言设计的fir滤波器,实验设计的的结果,很有价值。(CCS-based tools, the use of matlab and c language design fir filter, the results of experimental design, and great value.)
    2014-10-08 15:53:03下载
    积分:1
  • radio
    基于CC2430的点对点射频通信实验,我已经做过实验了,可以用。(Point to point communication experiment Based On CC2430.)
    2013-08-15 14:22:37下载
    积分:1
  • 套利精灵2019版本_源码(1)
    说明:  EA名称:套利精灵 EA类型:对冲套利 一、功能介绍 本EA遵行顺大势,逆小势策略入场交易; 二、核心优势 多货币套利,对冲风险获取盈利,每月有一次机会单局最大利润达到30% 三、注意事项 (1)如适用周期:该EA只须在欧美一分钟图表上,就能运行多对货币。 (2)资金要求:建议3000美金,最少入金不少于1000美金 (3)时间段:全时段,正常情况无需人工干预,在盈利的情况下,可视情况自行平仓;(EA Name: Arbitrage Elf EA Type: Hedging Arbitrage I. Introduction of Functions This EA follows the general trend and counter-minor strategy to enter the market. II. Core Advantages Multi-currency arbitrage, hedging risk for profit, once a month, the maximum profit of a single board reached 30%. Notes (1) If applicable: the EA can run multiple pairs of currencies only on a one-minute chart in Europe and the United States. (2) Capital requirements: Recommend $3000, at least $1000 (3) Time period: Full-time period, normal conditions without manual intervention, in the case of profit, according to the circumstances of self-liquidation;)
    2020-06-22 23:20:01下载
    积分:1
  • eye-gaze-estimation
    文中主要研究使用普通的摄像头进行人眼视线方向的估计。在综合介绍了各种人眼视线检测方法的基础上提出了一种新的图像处理的方法来检测人眼视线方向(The main study used an ordinary camera line of sight of the human eye is estimated. In the consolidated a variety of the human eye sight detection method based on a new image processing method to detect the line of sight of the human eye)
    2012-07-10 21:37:32下载
    积分:1
  • 696518资源总数
  • 106222会员总数
  • 14今日下载