# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
93845 | alexpetrescu | Robots (IOI13_robots) | C++14 | 928 ms | 20344 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 <algorithm>
#define MAXN 50000
#define MAXT 1000000
int A, B, T, viz[MAXT];
int timp, S[MAXT], W[MAXT], ind1[MAXT], ind2[MAXT];
int heap[MAXN + 1], X[MAXN], Y[MAXN];
int unde[MAXT], poz[MAXT];
bool cmpS(const int &a, const int &b) {
return S[a] < S[b];
}
bool cmpW(const int &a, const int &b) {
return W[a] < W[b];
}
inline void urcare(int p) {
while (p > 1 && W[heap[p]] > W[heap[p / 2]]) {
std::swap(heap[p], heap[p / 2]);
p /= 2;
}
}
inline void coborare(int p) {
int q;
bool f = 1;
while (f && (q = 2 * p) <= heap[0]) {
# | 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... |