# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
146259 | dolphingarlic | Job Scheduling (CEOI12_jobs) | C++14 | 349 ms | 13660 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>
#pragma GCC Optimize("O3")
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define MOD 1000000007
typedef long long ll;
using namespace std;
vector<int> a[100001];
bool check(int machines, int days, int jobs, int delay, bool output) {
queue<pair<int, int>> pending;
FOR(i, 1, days + 1) {
for (int j : a[i]) pending.push({i, j});
for (int j = 0; j < machines && pending.size(); j++) {
if (i - pending.front().first > delay) return false;
if (output) cout << pending.front().second << ' ';
pending.pop();
}
if (output) cout << "0\n";
}
return true;
}
int main() {
iostream::sync_with_stdio(false);
cin.tie(0);
int n, d, m;
cin >> n >> d >> m;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |