# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
50663 | AryanSM | Job Scheduling (CEOI12_jobs) | C++17 | 698 ms | 59908 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 int long long
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define F first
#define S second
#define ld long double
int const M=1e6+10,M2=1e7+10,mod=1e9+7,inf=1e9+10;
int m,d,a[M],n;
vector<int>hlp[M];
vector<pii>all;
bool check(int x,bool ch)
{
int day=1,cnt=0;
for(int i=0;i<m;i++)
{
if(cnt==x)day++,cnt=0;
if(day>n)return 0;
if(day<all[i].F)day=all[i].F,cnt=0;
if(day>all[i].F+d)return 0;
if(ch)hlp[day].pb(all[i].S);
cnt++;
}
return 1;
}
int32_t main()
{
cin>>n>>d>>m;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |