이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "robots.h"
using namespace std;
using ll = long long;
int putaway(int a, int b, int t, int x[], int y[], int w[], int s[]){
sort(x, x+a, greater<int>());
sort(y, y+b, greater<int>());
if(t == 2 && (a + b == 2)){
if(a == 2){
if((x[0] >= w[0] && x[1] >= w[1]) || (x[0] >= w[1] && x[1] >= w[0])){
return 1;
} else if(x[0] >= w[0] && x[0] >= w[1]){
return 2;
} else{
return -1;
}
} else if(b == 2){
if((y[0] >= s[0] && y[1] >= s[1]) || (y[0] >= s[1] && y[1] >= s[0])){
return 1;
} else if(y[0] >= s[0] && y[0] >= s[1]){
return 2;
} else{
return -1;
}
} else{
if((x[0] >= w[0] && y[0] >= s[1]) || (x[0] >= w[1] && y[0] >= s[0])){
return 1;
} else if((x[0] >= w[0] && x[0] >= w[1]) || (y[0] >= s[0] && y[0] >= s[1])){
return 2;
} else{
return -1;
}
}
}
return 0;
}
# | 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... |