# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223602 | staniewzki | Robots (IOI13_robots) | C++17 | 1942 ms | 24368 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<bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
using PII = pair<int, int>;
#include "robots.h"
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
sort(X, X + A), sort(Y, Y + B);
vector<PII> pts(T);
REP(i, T) pts[i] = {W[i], S[i]};
sort(pts.begin(), pts.end());
auto check = [&](int q) {
priority_queue<int> Q;
int cur = 0;
REP(i, A + 1) {
while(cur < size(pts) && (i == A || pts[cur].first < X[i]))
Q.emplace(pts[cur++].second);
if(i != A) REP(j, q) {
if(Q.empty()) break;
Q.pop();
}
}
for(int i = B - 1; i >= 0; i--) {
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... |