网站首页 站内搜索

搜索结果

查询Tags标签: 838,共有 1条记录
  • 基础算法 838.堆排序

    堆排序中,最主要的是这个down()函数#include<iostream> using namespace std;const int N = 100010; int h[N], cnt;void down( int k ){int t = k;if(k * 2 <= cnt && h[k * 2] < h[t]) t = k * 2;if(k * 2 + 1 <= cnt && h[k * 2 + 1] …

    2022/5/4 22:14:42 人评论 次浏览
扫一扫关注最新编程教程