# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
113336 | Kastanda | Job Scheduling (CEOI12_jobs) | C++11 | 222 ms | 20380 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, d, q;
pair < int , int > qu[N * 10];
vector < int > A[N];
inline bool Solve(int md, bool fnl = 0)
{
if (fnl)
printf("%d\n", md);
int l = 0, r = 0;
for (int i = 1; i <= n; i++)
{
if (r - l && qu[l].first < i - d)
return 0;
for (int id : A[i])
qu[r ++] = make_pair(i, id);
for (int j = 0; j < md && l < r; j++)
{
if (fnl)
printf("%d ", qu[l].second);
l ++;
}
if (fnl)
printf("0\n");
}
if (r - l)
return 0;
return 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |