# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172316 | maruii | Robots (IOI13_robots) | C++14 | 1950 ms | 12908 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 <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
#define ff first
#define ss second
int A, B, T, *X, *Y, *W, *S;
pii P[1000005];
bool f(int m) {
priority_queue<int> pq;
int j = 0;
for (int i = 0; i < A; ++i) {
while (j < T && P[j].ff < X[i]) {
pq.push(P[j].ss);
j++;
}
for (int k = 0; pq.size() && k < m; ++k) pq.pop();
}
for (; j < T; ++j) pq.push(P[j].ss);
for (int i = B - 1; i >= 0; --i) {
for (int j = 0; pq.size() && j < m; ++j) {
if (pq.top() >= Y[i]) return 0;
pq.pop();
}
}
return pq.size() == 0;
}
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... |