# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
253557 | spdskatr | Robots (IOI13_robots) | C++14 | 1891 ms | 26860 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.
#include "robots.h"
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <queue>
#define fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
int A, B, T, x[50005], y[50005], w[1000005], s[1000005], maxsz, maxwt;
pii byweight[1000005];
priority_queue<int> pq;
int check(int time) {
while (!pq.empty()) pq.pop();
// Let weak toys go first
int ptr = 0;
for (int i = 0; i < A; i++) {
while (ptr < T && byweight[ptr].fi < x[i]) {
pq.push(s[byweight[ptr].se]);
ptr++;
}
for (int j = 0; !pq.empty() && j < time; j++) {
pq.pop();
}
}
while (ptr < T) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |