堆和优先队列#include <iostream>using namespace std;class Heap {private: int *data; int capacity; int size; void update(int pos,int n) { int father = pos; int lchiled = father*2+1,rchiled = 2*father+2; while(lchi
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号