# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101835 | alexpetrescu | Dancing Elephants (IOI11_elephants) | C++14 | 9072 ms | 7992 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 "elephants.h"
#include <vector>
#include <algorithm>
#define MAXN 150000
#define MAXR 100
#define LOGR 6
#define MAXK 1600
#define LOGK 11
bool seen;
int n, l, k, r, mareleCnt;
std::vector < int > v[MAXR];
int u[MAXN], p[MAXN], poz[MAXN];
struct myc {
int x, y;
} dp[MAXN];
inline void calc(std::vector < int > &t) {
int j = t.size() - 1;
for (int i = t.size() - 1; i >= 0; i--) {
if (u[t[i]] + l >= u[t.back()]) dp[t[i]] = {1, u[t[i]] + l};
else {
while (j - 1 > i && u[t[j - 1]] > u[t[i]] + l)
j--;
dp[t[i]] = {1 + dp[t[j]].x, dp[t[j]].y};
}
}
}
# | 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... |