# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
56446 | Batrr | Job Scheduling (CEOI12_jobs) | C++14 | 689 ms | 23312 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>
#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define o cout<<"BUG"<<endl;
#define IOS ios_base::sync_with_stdio(0);
using namespace std;
const ll maxn=1e6+123,inf=1e18,mod=1e9+7;
int n,m,d,b[maxn];
pair<int,int>a[maxn];
bool check(int mx,bool flag){
queue<int>q;
for(int i=1,j=0;i<=n;i++){
while(j<m && a[j].f==i)
q.push(a[j++].s);
int cur=mx;
while(!q.empty() && cur){
if(b[q.front()]+d<i)
return 0;
if(flag)
cout<<q.front()<<" ";
q.pop();
cur--;
}
if(flag)
cout<<0<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |