제출 #1058960

#제출 시각아이디문제언어결과실행 시간메모리
1058960oscarsierra12로봇 (IOI13_robots)C++14
14 / 100
126 ms15788 KiB
#include "robots.h" #include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back typedef long long ll; typedef pair <ll,ll> pii; const ll N = 110; int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) { sort (X, X + A); sort (W, W + T); int lw = 1, hg = T + 1; while (lw < hg) { int mi = (lw + hg) / 2; int idx = A - 1; int can = 1; vector <int> use (A, 0); for (int i = T - 1; i >= 0; --i) { while (idx >= 0 && (use[idx] == mi || X[idx] <= W[i])) idx--; if (idx < 0) { can = 0; break; } use[idx]++; } if (can) hg = mi; else lw = mi + 1; } if (lw == T + 1) return -1; return hg; }
#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...