Submission #1261222

#TimeUsernameProblemLanguageResultExecution timeMemory
1261222repmannRobots (IOI13_robots)C++20
14 / 100
73 ms4420 KiB
#include <bits/stdc++.h> #include "robots.h" using namespace std; int A, B, T; int putaway(int a, int b, int t, int *X, int *Y, int *W, int *S) { A = a; B = b; T = t; sort(X, X + A); sort(Y, Y + B); for(int i = 0; i < T; i++) if((!A || (W[i] >= X[A - 1])) && (!B || (S[i] >= Y[B - 1]))) return -1; if((T == 2) && ((A + B) == 2)) { if((A == 2) && (min(W[0], W[1]) < X[0]) && (max(W[0], W[1]) < X[1])) return 1; if((B == 2) && (min(S[0], S[1]) < Y[0]) && (max(S[0], S[1]) < Y[1])) return 1; if((A == 1) && (B == 1) && (((W[0] < X[0]) && (S[1] < Y[0])) || ((W[1] < X[0]) && (S[0] < Y[0])))) return 1; return 2; } return -1; } //int main() //{ // int a, b, t; // cin >> a >> b >> t; // int x[a], y[b], w[t], s[t]; // 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...