# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154119 | mhy908 | Dancing Elephants (IOI11_elephants) | C++14 | 3609 ms | 3832 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;
typedef long long LL;
int n, sq, l, rea[150010], eleph[150010], basnum, updatenum;
struct data
{
int el[800], siz;
int next[800], cost[800];
void in_init(int p)
{
el[++siz]=p;
}
void get_arr()
{
for(int here=siz; here>=1; here--){
int ne=el[here]+l+1;
if(ne>el[siz]){
cost[here]=1;
next[here]=ne;
}
else{
int dow=lower_bound(el, el+siz+1, ne)-el;
cost[here]=cost[dow]+1;
next[here]=next[dow];
}
}
}
void in(int p)
{
# | 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... |