# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
104882 | daili | Job Scheduling (CEOI12_jobs) | C++14 | 318 ms | 13780 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;
bool check(int x, int n, vector<pair<int,int>> &allJobs, bool finall, int m, int d)
{
int ptr = 1;
for(int i = 1; i <= n;i++)
{
int ct = 0;
while(ptr <= m && allJobs[ptr].first <= i && ct < x)
{
if(allJobs[ptr].first + d >= i)
{
ptr++;
}
else
{
return false;
}
if(finall)
{
cout << allJobs[ptr-1].second << " ";
}
ct++;
}
if(finall)
{
cout << 0 << "\n";
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |