제출 #1069409

#제출 시각아이디문제언어결과실행 시간메모리
1069409allin27x로봇 (IOI13_robots)C++17
0 / 100
1 ms4444 KiB
#include <bits/stdc++.h> #include "robots.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); sort(W, W+t); if (W[t-1] > X[a-1]) return -1; int mc = a-1; int toy = t-1; int cnt = 0; vector<int> exc(a, 0); while (mc){ while (X[mc-1] < W[toy]) toy--, cnt++; exc[mc] = cnt; cnt = 0; mc--; } exc[mc] = toy+1; int ans = 1; for (int i=a-2; i>=0; i--) exc[i] = exc[i+1]+exc[i]; for (int i=0; i<a; i++) ans = max(ans, exc[i]/(a-i)); return ans; } /* 5 0 9 1 5 10 15 20 1 0 2 0 3 0 5 0 8 0 12 0 14 0 19 0 20 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...