Submission #714513

#TimeUsernameProblemLanguageResultExecution timeMemory
714513mseebacherRobots (IOI13_robots)C++17
14 / 100
3018 ms11400 KiB
#include "robots.h" #include <bits/stdc++.h> using namespace std; int putaway(int A,int B,int T, int X[],int Y[],int W[],int S[]){ sort(X,X+A); sort(Y,Y+B); set<int> se; for(int i = 0;i<T;i++){ if(W[i] >= X[A-1] && B == 0) return -1; if(S[i] >= Y[B-1] && A == 0) return -1; if(W[i] >= X[A-1] && S[i] >= Y[B-1]) return -1; for(int j = 0;j<A;j++){ if(W[i] < X[j]) se.insert(j); } for(int j = 0;j<B;j++){ if(S[i] < Y[j]) se.insert(j+A); } } return se.size() == 2 ? 1: 2; }
#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...