# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
232211 | DodgeBallMan | Job Scheduling (CEOI12_jobs) | C++14 | 357 ms | 23672 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 1e5+5;
int n, m, d;
vector<int> job[N], ans[N];
bool solve(int mid) {
queue<pii> Q;
for(int i = 1; i <= n; i++) ans[i].clear();
for(int i = 1; i <= n; i++) {
for(int x : job[i]) Q.emplace(x, i);
while(!Q.empty() && ans[i].size() < mid) {
pii now = Q.front(); Q.pop();
if(now.y + d < i) return false;
ans[i].emplace_back(now.x);
}
}
return Q.empty();
}
int main() {
scanf("%d %d %d", &n, &d, &m);
for(int i = 1, a; i <= m; i++) {
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |