# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
462451 | JovanB | Job Scheduling (CEOI12_jobs) | C++17 | 334 ms | 21168 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;
typedef long long ll;
typedef long double ld;
vector <int> vec[100005];
int n, d, m;
vector <int> resenje[100005];
bool check(int k){
queue <pair <int, int>> q;
for(int i=1; i<=n; i++){
resenje[i].clear();
}
for(int i=1; i<=n; i++){
for(auto c : vec[i]){
q.push({i, c});
}
if(q.empty()) continue;
if(q.front().first < i-d) return 0;
int g = k;
while(!q.empty() && g--){
resenje[i].push_back(q.front().second);
q.pop();
}
}
return 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |