Submission #657362

#TimeUsernameProblemLanguageResultExecution timeMemory
657362TrumlingRobots (IOI13_robots)C++14
0 / 100
1 ms212 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=0,n2=0; if(w>=x) n1=2; else if(w>=y) n1=1; if(s>=a) n2=2; else if(s>=b) n2=1; 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...