voidInsert(int x){
heap[++heapSize]= x;int u = heapSize;int fa = u>>1;while(fa >0){if(heap[u]<= heap[fa])return;swap(heap[u],heap[fa]);
u = fa;
fa >>=1;}}voidDelete(){swap(heap[1],heap[heapSize--]);int fa =1;int u = fa<<1;while(u <= heapSize){if((u|1)<=heapSize && heap[u|1]>heap[u]) u++;if(heap[fa]>= heap[u])return;swap(heap[fa],heap[u]);
fa = u;
u <<=1;}}