void test1() {
vector<int> va;
int a[] = {1,3,5,3,6,4,7,4,9};
for (int i = 0; i < sizeof(a)/sizeof(int); i++) {
va.push_back(a[i]);
}
cout << va.size() << endl;
make_heap(va.begin(), va.end());
print_vector<int>(va);
size_t n = va.size();
for (int i = n; i > 0; i--) {
pop_heap(va.begin(), va.begin() + i);
print_vector<int>(va);
}
}
template <typename T>
void print_vector(const vector<T>& v) {
for (size_t i = 0; i < v.size(); i++) {
cout << v[i] << " ";
}
cout << endl;
}