제출 #714513

#제출 시각아이디문제언어결과실행 시간메모리
714513mseebacher로봇 (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...