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;
int putaway(int A,int B,int T, int X[],int Y[],int W[],int S[]){
sort(X,X+A);
sort(Y,Y+B);
set<int> se;
for(int i = 0;i<T;i++){
if(W[i] >= X[A-1] && B == 0) return -1;
if(S[i] >= Y[B-1] && A == 0) return -1;
if(W[i] >= X[A-1] && S[i] >= Y[B-1]) return -1;
for(int j = 0;j<A;j++){
if(W[i] < X[j]) se.insert(j);
}
for(int j = 0;j<B;j++){
if(S[i] < Y[j]) se.insert(j+A);
}
}
return se.size() == 2 ? 1: 2;
}
# | 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... |