>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<<"删除完毕"<
于 2022-02-04 发布
文件大小:1.10 kB
0 146
堆排序算法,c++实现
主函数
int main(){
int n;
cout
下载说明:请别用迅雷下载,失败请重下,重下不扣分!
Finite volmue way to Couette(E)
A solver with 1order up-wind style to 2D incompressible viscous Couette
2019-06-16 09:49:13下载
积分:1
R2000模块开发C#开发文档
R2000读写器开发
2018-05-12下载
积分:1
C# 根据文件名提取文件类型图标
C# 根据文件名提取文件类型图标,设定好文件目录后,本例中是读取C:Windows下的所有文件,并根据文件类型自动显示图标,如测试图所示,将文件类型的图标添加到listView中,下面是具体的实现代码:
this.imageList1.Images.Clear();
this.listView1.Items.Clear();
string MyFolder = @"C:Windows";
DirectoryInfo MyDir = new DirectoryInfo(MyFolder);
ListViewItem MyItem;
this.listView1.BeginUpdate();
foreach (FileInfo MyFile in MyDir.GetFiles())
{
Icon MyIcon = SystemIcons.WinLogo;
MyItem = new ListViewItem(MyFile.Name, 1);
MyIcon = Icon.ExtractAssociatedIcon(MyFile.FullName);
if (!this.imageList1.Images.ContainsKey(MyFile.Extension))
{
MyIcon =Icon.ExtractAssociatedIcon(MyFile.FullName);
this.imageList1.Images.Add(MyFile.Extension, MyIcon);
}
MyItem.ImageKey = MyFile.Extension;
this.listView1.Items.Add(MyItem);
}
2023-07-30 19:25:04下载
积分:1
CarOverallstatus
全场地位系统:小车静止或移动过程中码盘进行全场定位,用的是avr单片机(Overall status of the system: stationary or moving vehicle to carry out the whole process of positioning)
2021-01-19 16:48:42下载
积分:1
图书馆管理系统
简单实现图书馆管理的功能,实现借书还书等简单的功能需求(Simple realization of the function of library management)
2018-04-01 20:08:11下载
积分:1
zte-c lient-win
中兴802.1x认证客户端源码 支持多网卡(ZTE802.1x authentication client source code to support multiple network card)
2020-11-03 18:19:53下载
积分:1
CCpuId100
得到CPU信息的程序.不过好像不准.(Program which obtains CPU information, But it seems not so accuracy.)
2002-04-19 09:18:04下载
积分:1
hload
vxworks的引导工具,可以在dos下直接引导vxworks镜像,速度非常快(vxworks loader,can load vxworks image file directily under DOS system,very fast,a fantastic tool)
2017-04-24 10:00:48下载
积分:1
pinlvc eliang_1
此代码是基于stm32对电压采集、频率测量、脉宽测量及显示的综合应用。(This code is based on the comprehensive application of STM32 to voltage acquisition, frequency measurement, pulse width measurement and display.)
2020-06-24 04:00:01下载
积分:1
UDP
基于UDP的串口通信,与TCP不同的是UDP利用的是广播技术,和服务端并没有建立可靠的连接(jiyuudpdechuankoutongxin)
2009-07-08 13:04:26下载
积分:1