# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
416458 | shubham20_03 | Job Scheduling (CEOI12_jobs) | C++17 | 188 ms | 18740 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 FAST ios_base::sync_with_stdio(false); cin.tie(NULL)
#define int long long
#define deb1(x) cout << #x << "=" << x << endl;
#define deb2(x, y) cout << #x << "=" << x << ", " << #y << "=" << y << endl;
#define ff first
#define ss second
#define pb push_back
int N, D, M;
vector<vector<int>> a;
bool ok(int m) {
vector<int> av(N + 1, m);
for (int i = 1; i <= N - D; i++) {
int jbs = a[i].size();
for (int j = i; j <= i + D && jbs; j++) {
if (av[j] >= jbs) {
av[j] -= jbs;
jbs = 0;
}
else {
jbs -= av[j];
av[j] = 0;
}
}
if (jbs) return 0;
}
return 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |