nihonium
/
mipt_clang
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

27 lines
538 B
C

#include <stdio.h>
#include "pqueue.c"
int main() {
int n;
scanf("%d", &n);
binary_heap *bh = binary_heap_new(n);
binary_heap_insert(bh, (bhnode) {10, 2});
binary_heap_insert(bh, (bhnode) {113, 34});
binary_heap_insert(bh, (bhnode) {1, 56});
binary_heap_insert(bh, (bhnode) {4, 6745});
binary_heap_insert(bh, (bhnode) {5, 321});
binary_heap_insert(bh, (bhnode) {6, 346});
print_heap(bh);
binary_heap_erase(bh);
print_heap(bh);
binary_heap_erase(bh);
binary_heap_erase(bh);
print_heap(bh);
binary_heap_destroy(bh);
}