# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
31468 | top34051 | 로봇 (IOI13_robots) | C++14 | 2306 ms | 20748 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robots.h"
#include<bits/stdc++.h>
using namespace std;
int n,m,k;
int a[50005], b[50005];
pair<int,int> p[1000005];
priority_queue<pair<int,int> > heap;
bool check(int cnt) {
int i,j,cur;
j = 0;
while(!heap.empty()) heap.pop();
for(i=0;i<n;i++) {
while(j<k && p[j].second<a[i]) heap.push(p[j++]);
for(cur=0;cur<cnt && !heap.empty();cur++) heap.pop();
}
while(j<k) heap.push(p[j++]);
for(i=m-1;i>=0;i--) {
for(cur=0;cur<cnt && !heap.empty();cur++) {
if(heap.top().first>=b[i]) return 0;
if(!heap.empty()) heap.pop();
}
}
return heap.empty();
}
bool cmp(pair<int,int> x,pair<int,int> y) {
return x.second<y.second;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |