# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168580 | arnold518 | Job Scheduling (CEOI12_jobs) | C++14 | 321 ms | 16888 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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5;
int N, D, M;
int A[MAXN+10];
vector<int> V[MAXN+10];
bool solve(int x)
{
int i, j;
queue<pii> Q;
for(i=1; i<=N; i++)
{
for(auto it : V[i]) Q.push({it, i});
for(j=0; j<x && !Q.empty(); j++)
{
if(Q.front().second<i-D) return false;
Q.pop();
}
}
if(!Q.empty()) return false;
return true;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |