# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
442251 | cpp219 | Job Scheduling (CEOI12_jobs) | C++14 | 244 ms | 9796 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.
#pragma GCC optimization O2
#pragma GCC optimization "unroll-loop"
#pragma target ("avx2")
#include <bits/stdc++.h>
#define ll int
#define ld long double
#define fs first
#define sc second
using namespace std;
typedef pair<ll,ll> LL;
const ll N = 1e6 + 9;
const ll Log2 = 20;
const ll inf = 1e9 + 7;
ll n,m,d,a[N],pos[N];
bool lf(ll x,ll y){
return a[x] < a[y];
}
vector<ll> ans[100009];
bool chk(ll mid){
ll cur = 1;
for (ll day = 1;day <= n;day++){
ll have = mid; ans[day].clear();
while(have > 0 && cur <= m&&a[pos[cur]] <= day){
if (day - a[pos[cur]] > d) return 0;
//ans[day].push_back(pos[cur]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |