# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96296 | shoemakerjo | Job Scheduling (CEOI12_jobs) | C++14 | 968 ms | 30584 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int N, M, D;
const int maxm = 1000010;
const int maxn = 100010;
vector<int> ac[maxn]; //store indices of all that start at me
int ans[maxm];
int st[maxm]; //store start for all values
vector<int> res[maxn];
bool go(int mid) {
queue<int> q;
for (int i = 1; i <= N; i++) {
for (int v : ac[i]) q.push(v);
for (int j = 1; j <= mid; j++) {
if (q.empty()) break;
if (st[q.front()] + D < i) return false;
ans[q.front()] = i;
q.pop();
}
}
return q.size() == 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |