# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
41290 | evpipis | Job Scheduling (CEOI12_jobs) | C++98 | 354 ms | 14692 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;
#define fi first
#define se second
typedef pair<int, int> ii;
const int len = 1e6+5;
int n, d, m;
ii a[len];
bool check(int x){
int po = 0;
for (int i = 1; i <= n+1; i++){
int temp = x;
while (po < m && temp-- && a[po].fi <= i){
if (i > d+a[po].fi) return false;
po++;
}
}
return true;
}
int bs(){
int l = 1, r = m, ans;
while (l <= r){
int mid = (l+r)/2;
if (check(mid)){
ans = mid;
r = mid-1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |