# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
56446 | Batrr | Job Scheduling (CEOI12_jobs) | C++14 | 689 ms | 23312 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define o cout<<"BUG"<<endl;
#define IOS ios_base::sync_with_stdio(0);
using namespace std;
const ll maxn=1e6+123,inf=1e18,mod=1e9+7;
int n,m,d,b[maxn];
pair<int,int>a[maxn];
bool check(int mx,bool flag){
queue<int>q;
for(int i=1,j=0;i<=n;i++){
while(j<m && a[j].f==i)
q.push(a[j++].s);
int cur=mx;
while(!q.empty() && cur){
if(b[q.front()]+d<i)
return 0;
if(flag)
cout<<q.front()<<" ";
q.pop();
cur--;
}
if(flag)
cout<<0<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |