# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392795 | nicolaalexandra | Job Scheduling (CEOI12_jobs) | C++14 | 506 ms | 20124 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 DIM 1000010
#define DIMN 100010
using namespace std;
pair <int,int> v[DIM];
vector <int> ans[DIMN];
int n,d,m,i;
int verif (int val){
for (int i=1;i<=m;i++)
ans[i].clear();
int pos = 1;
for (int i=1;i<=m;i++){
/// ce fac in ziua i?
int cnt = 0;
while (pos <= n && v[pos].first <= i && cnt < val){
if (v[pos].first + d < i)
return 0;
ans[i].push_back(v[pos].second);
cnt++;
pos++;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |