# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
916345 | JakobZorz | Dancing Elephants (IOI11_elephants) | C++17 | 5653 ms | 21496 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<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int BUCKET_SIZE=256;
int l;
int pos[150000];
struct Bucket{
vector<int>arr;
vector<int>num;
vector<int>pos;
void regen(){
num.resize(arr.size());
pos.resize(arr.size());
for(int i=(int)arr.size()-1;i>=0;i--){
num[i]=1;
int p=arr[i]+l;
if(p>=arr.back()){
pos[i]=p;
continue;
}
int l=-1,r=(int)arr.size();
while(l<r-1){
int m=(l+r)/2;
if(arr[m]<=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... |