# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167666 | kim | Dancing Elephants (IOI11_elephants) | C++20 | 3421 ms | 12872 KiB |
#include "elephants.h"
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using pii=pair<int,int>;
using i3=array<int,3>;
#define f first
#define s second
#define eb emplace_back
#define sz(x) (int)x.size()
#define add(x,y) ((x+y)%md)
#define Add(x,y) (x=add(x,y))
#define mul(x,y) ((x*y)%md)
#define Mul(x,y) (x=mul(x,y))
const int inf=1e9;
const ll linf=1e18;
const ll md=1e9+7;
int n,L,X_[150005],sq,upd_cnt;
vector<vector<i3>> dp;
multiset<pii> ms;
void init_block(vector<i3> &v){
for(int r=sz(v), l=r-1; l>=0; --l){
while(v[r-1][0]>=v[l][0]+L) --r;
if(r==sz(v)) v[l][1]=1, v[l][2]=v[l][0]+L;
else v[l][1]=1+v[r][1], v[l][2]=v[r][2];
}
}
int get_ans(){
# | 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... |