이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |