Submission #220395

#TimeUsernameProblemLanguageResultExecution timeMemory
220395summitweiRobots (IOI13_robots)C++17
0 / 100
5 ms384 KiB
#include <bits/stdc++.h> #include <robots.h> using namespace std; typedef vector<int> vi; typedef vector<pair<int, int> > vpii; typedef pair<int, int> pii; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; typedef vector<ll> vll; #define INF 0x3f3f3f3f #define MOD 1000000007LL #define EPSILON 0.00001 #define f first #define s second #define pb push_back #define mp make_pair #define FOR(i, a, b) for (ll i=(a); i<=(signed)(b); i++) #define F0R(i, a) for (ll i=0; i<(signed)(a); i++) #define RFOR(i, a, b) for (ll i=(a); i >= b; i--) #define MN 1000005 int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]){ int b1 = 0, b2 = 0; if(A == B){ if(X[0] >= W[0]) b1++; if(X[0] >= W[1]) b2++; if(Y[0] >= S[0]) b1 += 2; if(Y[0] >= S[1]) b2 += 2; if(b1 == 0 || b2 == 0) return -1; if(b1 == b2 && b1 != 3) return 2; return 1; } else if(A == 2){ if(X[0] >= W[0]) b1++; if(X[0] >= W[1]) b2++; if(X[1] >= W[0]) b1 += 2; if(X[1] >= W[1]) b2 += 2; if(b1 == 0 || b2 == 0) return -1; if(b1 == b2 && b1 != 3) return 2; return 1; } else{ if(Y[0] >= S[0]) b1++; if(Y[0] >= S[1]) b2++; if(Y[1] >= S[0]) b1 += 2; if(Y[1] >= S[1]) b2 += 2; if(b1 == 0 || b2 == 0) return -1; if(b1 == b2 && b1 != 3) return 2; return 1; } } /*int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int A, B, T; cin >> A >> B >> T; int X[A], Y[B], W[T], S[T]; F0R(i, A) cin >> X[i]; F0R(i, B) cin >> Y[i]; F0R(i, T) cin >> W[i] >> S[i]; cout << putaway(A, B, T, X, Y, W, S) << "\n"; return 0; }*/
#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...