Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
奇怪好奇怪pop_heap(stack,stack+ct,cmp); stack[ct-1] = s[i].q; push_heap(stack,stack+ct,cmp); // stack[0]=s[i].q; // pop_heap(stack,stack+ct,cmp); // push_heap(stack,stack+ct,cmp); 这两段代码等效么?怎么都能过?pop_heap不是把最后一个元素加到堆头,然后 shift_down 么? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator