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>
#define ll long long
#define ff first
#define ss second
#define ln "\n"
using namespace std;
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
vector<ll> robots(A+B);
vector<bool> doable(T);
for (ll i=0; i<T; i++){
for (ll j=0; j<A; j++){
if (W[i]<X[j]) {doable[i]=1; robots[j]++;}
}
for (ll j=A; j<B; j++){
if (S[i]<Y[j-A]) {doable[i]=1; robots[j]++;}
}
}
if (doable[0] and doable[1]){
if (robots[0] and robots[1]) return 1;
else return 2;
}else return -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... |