update: poj 1002, use heapsort and quicksort