feat(priority-queue): new priority-queue problem formated

This commit is contained in:
2025-10-31 12:20:17 -03:00
parent 4aebd4c9db
commit 33df64c1c0
226 changed files with 6864 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int n = inf.readInt(1, 1e5, "n");
inf.readSpace();
inf.readInt(1, 1e5, "k");
inf.readEoln();
int lastTime = 0;
for (int i = 0; i < n; i++) {
if (i != 0) inf.readSpace();
int curTime = inf.readInt(0, 1e5, "ti");
ensuref(curTime >= lastTime, "Times must be in increasing order");
lastTime = curTime;
}
inf.readEoln();
inf.readEof();
return 0;
}