c语言实现最大堆关键代码 --自用板子(考试用) 代码 代码 下面展示 关键代码。 int q[maxn],tot; int a[maxn]; void insert(int x){ q[++tot]=x; int fa=tot/2; int pos=tot; while(q[fa]