# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198702 | arnold518 | Robots (IOI13_robots) | C++14 | 2085 ms | 26944 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 5e4;
const int MAXT = 1e6;
struct Toy { int W, S; };
int A, B, T, X[MAXN+10], Y[MAXN+10];
Toy toy[MAXT+10];
bool decide(int x)
{
int i, j, k;
priority_queue<int> PQ;
for(i=1, j=1; i<=A; i++)
{
for(; j<=T && toy[j].W<X[i]; j++) PQ.push(toy[j].S);
for(k=0; k<x && !PQ.empty(); k++) PQ.pop();
}
for(; j<=T; j++) PQ.push(toy[j].S);
vector<int> V;
while(!PQ.empty()) V.push_back(PQ.top()), PQ.pop();
reverse(V.begin(), V.end());
Compilation message (stderr)
# | 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... |