# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
751846 | ndh990 | Job Scheduling (CEOI12_jobs) | C++11 | 422 ms | 26436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef int ll;
typedef pair<int, int> pairs;
using vi = vector<ll>;
#define mp make_pair
ll n,d,m;
pair<bool, vector<vi>> isFeasible(const vector<pairs> &jobs, int machineCount) {
vector<vi> schedule(n);
ll reqNum = 0;
for (ll day = 1; day <= n; day++) {
for (ll j = 0; j < machineCount; j++) {
if(jobs[reqNum].first>day)
{
break;
}
if(jobs[reqNum].first+d>=day)
{
schedule[day-1].push_back(jobs[reqNum++].second);
}
else return mp(false, schedule);
if (reqNum == m) return mp(true, schedule);
}
}
return mp(false, schedule);
}
int main()
{
cin.tie(0)->sync_with_stdio(false);
cin >> n >> d >> m;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |