# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
971024 | andro | Robots (IOI13_robots) | C++14 | 169 ms | 10180 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>
#include "robots.h"
using namespace std;
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
sort(X, X + A);
sort(Y, Y + B);
for(int i = 0; i < T; i++) {
if(W[i] >= X[A - 1] && S[i] >= Y[B - 1]) {
return - 1;
}
}
vector<pair<int,int>> omg;
for(int i = 0; i < T; i++) {
omg.push_back({W[i], S[i]});
}
sort(omg.begin(), omg.end());
int l = 1, r = 1e6, ans = - 1;
while(l <= r) {
int mid = (l + r) / 2;
int pok = A - 1;
int R = 0;
int pok1 = B - 1;
int ok = 0;
int R1 = 0;
for(int i = omg.size() - 1; i >= 0; i--) {
if(pok < 0 && pok1 < 0) {
ok = 1;
# | 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... |