# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94353 | fjzzq2002 | Robots (IOI13_robots) | C++14 | 2290 ms | 63832 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;
#define pb push_back
#define fi first
#define se second
typedef pair<int,int> pii;
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
vector<int> x,y;
for(int i=0;i<A;++i) x.pb(X[i]);
for(int i=0;i<B;++i) y.pb(Y[i]);
sort(x.begin(),x.end());
sort(y.begin(),y.end());
multiset<pii> a,b;
for(int i=0;i<T;++i)
{
int p=x.end()-upper_bound(x.begin(),
x.end(),W[i]),
q=y.end()-upper_bound(y.begin(),
y.end(),S[i]);
if(p==0&&q==0) return -1;
a.insert(pii(p,q));
b.insert(pii(q,p));
}
int cn=0;
while(a.size())
{
++cn;
for(int i=1;i<=A;++i)
{
# | 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... |