#include<iostream>#include<vector>#include<set>#include<cmath>using namespace std;int lChild(int i){ return 2*i;}int rChild(int i){ return 2*i + 1;}void swap(int &a, int &b){ int t = a; a = b; b = t;}//min-heapvoid sift_down(int a[], int n, int i){ int min = i; int l Read More
posted @ 2013-03-21 00:34 Frank@609 Views(162) Comments(0) Diggs(0) Edit