# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
207136 | zvonimir11 | Job Scheduling (CEOI12_jobs) | C++17 | 649 ms | 17032 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int n, m, d, a[1000005], b[100005];
vector<int> dn[100005];
bool f(int x, bool is) {
queue<int> p;
for(int i = 1; i <= n; ++i) {
int o = x;
while(!p.empty() && o > 0) {
if(i - p.front() > d)
return 0;
--o;
if(is)
cout << dn[p.front()].back() << " ", dn[p.front()].pop_back();
p.pop();
}
for(int j = 0; j < b[i]; ++j) {
if(o > 0) {
--o;
if(is)
cout << dn[i].back() << " ", dn[i].pop_back();
continue;
}
p.push(i);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |