# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
746193 | JellyTheOctopus | Job Scheduling (CEOI12_jobs) | C++17 | 209 ms | 13504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int N, D, M;
vector<int> arr[100001];
bool check(int x) {
queue<int> q;
int wait = 0;
for (int i = 1; i <= N; i++) {
for (int j = 0; j < (int)arr[i].size(); j++) {
q.push(i);
}
if (!q.empty()) {
wait = max(wait, i-q.front());
}
for (int j = 0; j < x && !q.empty(); j++) {
q.pop();
}
}
return wait <= D;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> N >> D >> M;
for (int i = 1; i <= M; i++) {
int t;
cin >> t;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |