# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
169295 | AlexLuchianov | Robots (IOI13_robots) | C++14 | 1973 ms | 24908 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 <vector>
#include <algorithm>
#include <queue>
#include <iostream>
struct Toy{
int weight;
int size;
bool operator < (Toy const &a) const{
return weight < a.weight;
}
};
int const nmax = 1000000;
Toy v[1 + nmax];
int weak[1 + nmax], small[1 + nmax];
int N, M, T;
bool test(int time){
int ptr = 0;
std::priority_queue<int> pq;
for(int i = 0; i < N; i++) {
while(ptr < T && v[ptr].weight < weak[i])
pq.push(v[ptr++].size);
for(int h = 0;h < time; h++)
if(0 < pq.size())
pq.pop();
else
# | 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... |