# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
106641 | naoai | Job Scheduling (CEOI12_jobs) | C++14 | 487 ms | 20700 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;
#define fin cin
#define fout cout
//ifstream fin("x.in"); ofstream fout("x.out");
const int mmax = 1e6 + 5;
int n, d, m;
int a[mmax + 1];
pair<int, int> v[mmax + 1];
bool check (int val) {
int i = 1;
for (int z = 1; z <= n; ++ z) {
int aux = i;
for (int j = i; j < i + val && a[j] <= z && j <= m; ++ j, ++ aux) {
if (a[j] + d < z)
return 0;
}
i = aux;
}
return 1;
}
int main() {
// ios::sync_with_stdio(0); cin.tie(nullptr);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |