# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
146259 | dolphingarlic | Job Scheduling (CEOI12_jobs) | C++14 | 349 ms | 13660 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |