# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
9162 | yukariko | Your life (kriii2_Y) | C11 | 164 ms | 21656 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
typedef struct node{int w,v;} hDATA;
typedef struct Heap{
hDATA *arr;
int count;
int capacity;
int (*compare)(hDATA p,hDATA q);
}Heap;
#define MAX_HEAP hMaxCompare
#define MIN_HEAP hMinCompare
int hParent(Heap *h, int i)
{
if(i<=0||i>=h->count)return -1;
return (i-1)/2;
}
int hLeftChild(Heap *h, int i)
{
int t=2*i+1;
if(t>=h->count)return -1;
return t;
}
int hRightChild(Heap *h, int i)
{
int t=2*i+2;
if(t>=h->count)return -1;
return t;
}
hDATA hTop(Heap *h)
{
return h->arr[0];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |