# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
16494 | CodingBug | Robots (IOI13_robots) | C++98 | 4 ms | 14080 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 "robots.h"
#include <queue>
#include <algorithm>
#define N 50000
#define M 1000000
using namespace std;
typedef pair<int,int> ppair;
int a[N+1],b[N+1],na,nb,m;
ppair s[M+1];
priority_queue<int> Q;
bool check(int lmt){
int i,j,k;
for(i=0,j=0;i<na;i++){
for(;j<m && s[j].first<a[i];j++) Q.push(s[j].second);
for(k=0;k<lmt && !Q.empty();k++) Q.pop();
}
for(;j<m;j++) Q.push(s[j].second);
for(i=nb-1;i>=0;i--){
for(k=0;k<lmt && !Q.empty() && Q.top()<b[i];k++) Q.pop();
}
return Q.empty();
}
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
int i;
na=A; nb=B; m=T;
# | 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... |