# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97645 | dalgerok | Job Scheduling (CEOI12_jobs) | C++14 | 286 ms | 13752 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;
const int N = 1e6 + 5;
int n, d, m;
pair < int, int > a[N];
inline bool check(int x){
int i = 1, day = 0;
while(i <= m){
day += 1;
int j = i;
while(j <= min(m, i + x - 1) && day >= a[j].first){
if(a[j].first + d < day){
return false;
}
j += 1;
}
i = j;
}
return true;
}
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |