# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
160628 | luciocf | Job Scheduling (CEOI12_jobs) | C++14 | 377 ms | 13832 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>
#define ff first
#define ss second
using namespace std;
typedef pair<int, int> pii;
const int maxn = 1e6+10;
int n, d, m;
pii a[maxn];
bool ok(int x)
{
int cur_d = 1;
for (int i = 1; i <= m; i++)
{
int j = i;
for (; j <= m && a[j].ff <= cur_d && j-i+1 <= x; j++)
if (cur_d > a[j].ff+d)
return 0;
i = j-1;
cur_d++;
}
return 1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |