一、堆1234567891011void heap_swap(int a,int b){ swap(ph[hp[a]],ph[hp[b]])}void up(int u){while(u/2&&h[u]<h[u/2]){ { heap_swap(u,u/2); u/=2; }}}