# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99620 | naoai | Dancing Elephants (IOI11_elephants) | C++14 | 6885 ms | 12164 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 <bits/stdc++.h>
using namespace std;
static const int nmax = 15e4;
static const int rad = 400 * 4;
static int n, L;
static int up_cnt;
static int bucket[nmax + 1];
static pair<int, int> pozitii[nmax + 1];
static int nrb;
static int sz[nmax / rad + 1];
struct str {
int x, ind, pos, dp;
};
str v[nmax / rad + 1][2 * rad + 5];
void compute (int b) {
int ind = sz[b];
for (int i = sz[b] - 1; i >= 0; -- i) {
while (ind - 1 > i && v[b][ind - 1].x > v[b][i].x + L) {
-- ind;
}
if (ind == sz[b]) {
# | 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... |