# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99884 | bharat2002 | Job Scheduling (CEOI12_jobs) | C++14 | 411 ms | 17528 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.
/*input
8 2 12
1 2 4 2 1 3 5 6 2 3 6 4
*/
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
const int N=1e6 + 100;
#define pii pair<int, int>
#define f first
#define s second
#define mp make_pair
pii arr[N];int n, m, d, oriarr[N];//vector<int> days[N];
bool final;
bool p(int x){
int ptr=1;
for(int i=1;i<=n;i++)
{
int ct=0;
while(ptr<=m&&arr[ptr].f<=i&&ct<x)
{
if(arr[ptr].f+d>=i) ptr++;
else return false;
if(final) cout<<arr[ptr-1].s<<" ";
ct++;
}
if(final) cout<<0<<endl;
}
if(ptr<=m) return false;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |