#include <iostream>
using namespace std;
std::priority_queue<task> read_tasks(int n){
std::priority_queue<task> tasks(task, std::vector<task>, compare);
task t;
for(int i = 0; i < n; i++){
t.id = i + 1;
std::cin >> t.time;
std::cin >> t.priority;
tasks.push(t);
}
return tasks;
}
int main() {
// your code goes here
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RkOjpwcmlvcml0eV9xdWV1ZTx0YXNrPiByZWFkX3Rhc2tzKGludCBuKXsKCXN0ZDo6cHJpb3JpdHlfcXVldWU8dGFzaz4gdGFza3ModGFzaywgc3RkOjp2ZWN0b3I8dGFzaz4sIGNvbXBhcmUpOwoJdGFzayB0OwoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKyl7CgkJdC5pZCA9IGkgKyAxOwoJCXN0ZDo6Y2luID4+IHQudGltZTsKCQlzdGQ6OmNpbiA+PiB0LnByaW9yaXR5OwoJCXRhc2tzLnB1c2godCk7Cgl9CglyZXR1cm4gdGFza3M7Cn0KCmludCBtYWluKCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJcmV0dXJuIDA7Cn0=