Submission #1080704

#TimeUsernameProblemLanguageResultExecution timeMemory
1080704GrayRobots (IOI13_robots)C++17
0 / 100
3079 ms15900 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...