# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
53318 | imeimi2000 | Robots (IOI13_robots) | C++17 | 2164 ms | 196608 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 <algorithm>
#include <queue>
using namespace std;
typedef pair<int, int> pii;
int a, b, t;
int x[50000];
int y[50000];
pii toy[1000000];
int check(int c) {
priority_queue<int> pq;
int j = 0;
for (int i = 0; i < a; ++i) {
while (j < t && toy[j].first < x[i]) pq.push(toy[j++].second);
for (int k = 0; k < c && pq.size(); ++k) pq.pop();
}
while (j < t) pq.push(toy[j++].second);
for (int i = b; i--; ) {
if (pq.size() && y[i] <= pq.top()) return 0;
for (j = 0; j < c && pq.size(); ++j) pq.pop();
}
return pq.empty();
}
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
a = A;
b = B;
# | 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... |