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[]) {
vector<int> kemampuan;
if (T == 2 and A+B == 2) {
for (int i = 0; i < A; i++) {
for (int j = 0; j < T; j++) {
if (W[j] < X[i]) kemampuan.push_back(1);
else kemampuan.push_back(0);
}
}
for (int i = 0; i < B; i++) {
for (int j = 0; j < T; j++) {
if (S[j] < Y[i]) kemampuan.push_back(1);
else kemampuan.push_back(0);
}
}
// for (auto i: kemampuan) cout << i << " ";
// cout << endl;
if (kemampuan[0] == 0 and kemampuan[2] == 0) return -1;
if (kemampuan[1] == 0 and kemampuan[3] == 0) return -1;
if (kemampuan[0] == 1 and kemampuan[3] == 1) return 1;
if (kemampuan[1] == 1 and kemampuan[2] == 1) return 1;
return 2;
}
return 42;
}
# | 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... |