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;
vector<int>pos[10];
int putaway(int A, int B, int T, int x[], int y[], int w[], int s[])
{
for(int i=0; i<T; i++)
{
for(int j=0; j<A; j++)
{
if(w[i]<x[j]) pos[i].push_back(j);
}
for(int j=0; j<B; j++)
{
if(s[i]<y[j]) pos[i].push_back(j+A);
}
}
if(pos[0].size()==0 or pos[1].size()==0) return -1;
int hv1=0, hv0=0;
for(int i=0; i<T; i++)
{
for(int u : pos[i])
{
if(u==1) hv1=1;
else hv0=1;
}
}
if(!hv0 or !hv1) return 2;
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... |