# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
211677 | anonymous | 로봇 (IOI13_robots) | C++14 | 1785 ms | 22892 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "robots.h"
#include<queue>
#include<utility>
#include<algorithm>
#define MAXT 1000005
#define MAXR 50005
using namespace std;
pair<int,int> Toy[MAXT];
priority_queue<int> PQ; //from big to small
int A, B, T, Weak[MAXR], Small[MAXR]; //weak size, small size
bool can(int k) {
int pt = 0;
while (PQ.size()) {PQ.pop();}
for (int i=0; i<A; i++) {
while (pt < T && Toy[pt].first < Weak[i]) {
PQ.push(Toy[pt].second), pt++;
}
for (int j=0; j<k && PQ.size(); j++) {PQ.pop();}
}
for (int i=pt; i<T; i++) {
PQ.push(Toy[i].second);
}
for (int i=B-1; i>=0; i--) {
for (int j=0; j<k; j++) {
if (PQ.size() && PQ.top() < Small[i]) {PQ.pop();}
else {break;}
}
}
return(PQ.empty());
}
# | 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... |