제출 #657353

#제출 시각아이디문제언어결과실행 시간메모리
657353Trumling로봇 (IOI13_robots)C++14
0 / 100
0 ms308 KiB
#include "robots.h"
#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
 

int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) 
{
ll a,b;
a=W[0];
b=W[1];
if(a>b)
swap(a,b);
if(A==2)
{
ll x,y;
x=X[0];
y=X[1];

if(x>y)
swap(x,y);

if(y<b)
return -1;

if(x>=a)
return 1;

return 2;
}

a=S[0];
b=S[1];
if(a>b)
swap(a,b);

if(B==2)
{
ll x,y;
x=Y[0];
y=Y[1];

if(x>y)
swap(x,y);

if(y<b)
return -1;

if(x>=a)
return 1;

return 2;
}

a=S[0];
b=S[1];
ll x=W[1],y=W[0];


if(x>y)
swap(x,y);

if(a>b)
swap(a,b);

ll w,s;
w=X[0];
s=Y[0];
ll n1,n2;
if(w>=x)
n1=1;
if(w>=y)
n1=2;

if(s>=a)
n2=1;
if(s>=b)
n2=2;

if((n1==2 && n2>=1)||(n2==2 && n1>=1))
return 1;

if(n1==2 || n2==2)
return 2;

if(n1==0 || n2==0)
return -1;

if((X[0]<=w && Y[0]<=s) || (X[1]<=w && Y[1]<=s))
return -1;

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...