# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
224423 | MKopchev | Job Scheduling (CEOI12_jobs) | C++14 | 357 ms | 17144 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 MX=1e6+42;
int n,d,m;
pair<int,int> inp[MX];
bool can(int sz)
{
int pos=1;
for(int day=1;day<=n&&pos<=m;day++)
{
if(inp[pos].first+d<day)return 0;
int pos_help=pos;
while(pos_help<=m&&pos_help-pos<sz&&inp[pos_help].first<=day)
{
pos_help++;
}
pos=pos_help;
}
return pos>m;
}
int main()
{
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |