Submission #962954

#TimeUsernameProblemLanguageResultExecution timeMemory
962954stev2005Robots (IOI13_robots)C++17
0 / 100
1 ms4444 KiB
#include "robots.h" #include<bits/stdc++.h> using namespace std; inline void subtask1(){} int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) { //subtask1: if (T == 2 && A + B == 2){ if (A == 0){ int rsz1 = max(Y[0], Y[1]); int rsz2 = min(Y[0], Y[1]); int tsz1 = max(S[0], S[1]); int tsz2 = min(S[0], S[1]); if (rsz1 < tsz1) return -1; if (rsz2 < tsz2) return 2; else return 1; } else if (A == 1){ int rw = X[0]; int rsz = Y[0]; int tw1 = W[1], tw2 = W[2], tsz1 = S[1], tsz2 = S[2]; if (tw1 < tw2){ tw1 ^= tw2 ^= tw1 ^= tw2; tsz1 ^= tsz2 ^= tsz1 ^= tsz2; } if (rw < tw1 && rsz < tsz1) return -1; int mintime = 2; if (rsz >= tsz2) mintime = 1; if (rsz >= tsz1) mintime = 1; return mintime; } else if (A == 2){ int rsz1 = max(X[0], X[1]); int rsz2 = min(X[0], X[1]); int tsz1 = max(W[0], W[1]); int tsz2 = min(W[0], W[1]); if (rsz1 < tsz1) return -1; if (rsz2 < tsz2) return 2; else return 1; } } return 42; }
#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...