# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
118034 | Adhyyan1252 | Job Scheduling (CEOI12_jobs) | C++11 | 601 ms | 26836 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;
//11 37
int n, d, m;
vector<pair<int, int> > a;
vector<vector<int> > g;
bool pos(int c, vector<vector<int> >& sch){
//is it poss to do it with c machines
sch.resize(n);
int pntr = 0;
for(int i = 0; i < n; i++){
for(int j : g[i]){
pntr = max(pntr, i);
while(pntr < n && sch[pntr].size() >= c){
pntr++;
}
if(pntr > i + d) return false;
sch[pntr].push_back(j);
}
}
return true;
}
int main(){
ios::sync_with_stdio(false); cin.tie(0);
cin>>n>>d>>m;
a.resize(m);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |