# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94933 | popovicirobert | Job Scheduling (CEOI12_jobs) | C++14 | 231 ms | 14004 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 lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
#define ld long double
// 217
// 44
using namespace std;
const int MAXM = (int) 1e6;
pair <int, int> arr[MAXM + 1];
inline bool check(int m, int d, int len) {
int pos = 1;
int cnt = 0;
while(pos <= m) {
cnt++;
int i;
for(i = pos; i < min(m + 1, pos + len) && cnt >= arr[i].first; i++) {
if(cnt - arr[i].first > d) {
return 0;
}
}
pos = i;
}
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |