#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>

#define MAX 1000

typedef struct {
    int taskID;
    int priority;
} Task;

Task heap[MAX];
int heapSize = 0;

void swap(task *a, Task *b){
    Task temp = *a;
    *a = *b;
    *b = temp;
}

void insertTask(int taskID, int priority){
    heapSize++;
    heap[heapSize].taskID =taskID;
    heap[heapSize].priority = priority;
    
    int i =heapSize;
    while (i>1 && heap[i /2].priority > heap[i].priority){
        swap(&heap[i],&heap[i/2]);
        i /=2;
    }
    printf("Task Added:%d\n",taskID);
}
Task extractMin(){
    Task min = heap[1];
    heap[1]=heap[heapSize];
    heapS
}