# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
433481 | someone | Dancing Elephants (IOI11_elephants) | C++14 | 1213 ms | 4828 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;
struct Val {
int i, val, nb, exces;
bool operator <(const Val& other) const {
return val < other.val;
}
};
const int T = 1042, N = 150 * 1000 + 10, NB_BLOCS = 1000, INF = 1e9;
Val pos[N];
set<Val> iBloc;
int n, len, position[N];
vector<Val> bloc[NB_BLOCS];
void recalcul(int i) {
int t = bloc[i].size();
for(int j = t-1, k = t; j > -1; j--) {
while(k > 0 && bloc[i][j].val + len < bloc[i][k-1].val)
k--;
if(k == t) {
bloc[i][j].nb = 1;
bloc[i][j].exces = bloc[i][j].val + len;
} else {
bloc[i][j].nb = bloc[i][k].nb + 1;
bloc[i][j].exces = bloc[i][k].exces;
# | 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... |