# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1165021 | julia_08 | Job Scheduling (CEOI12_jobs) | C++20 | 790 ms | 20456 KiB |
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
vector<int> requests[MAXN], jobs[MAXN];
int n, d, m;
bool check(int x){
priority_queue<pair<int, int>> q;
for(int i=1; i<=n; i++){
jobs[i].clear();
for(auto j : requests[i]) q.push({-i, j});
int cnt = 0;
while(cnt < x && !q.empty()){
if(-q.top().first < i - d) return false;
jobs[i].push_back(q.top().second);
q.pop();
cnt ++;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |