# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
284873 | TMJN | Dancing Elephants (IOI11_elephants) | C++17 | 9005 ms | 7048 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;
const int bsize=800;
int N,A[150000],B[150000],C[150000],P[150000],L,D[1000],c;
vector<int>vb[1000];
pair<int,int>pp[150000];
void update_bucket(int t){
for(int i:vb[t]){
C[i]=t;
}
for(int i=vb[t].size()-1;i>=0;i--){
int l,r;
l=i;
r=vb[t].size();
while(l+1!=r){
int m=(l+r)/2;
if(P[vb[t][i]]+L<P[vb[t][m]]){
r=m;
}
else{
l=m;
}
}
if(r==vb[t].size()){
A[vb[t][i]]=1;
B[vb[t][i]]=P[vb[t][i]]+L;
}
Compilation message (stderr)
# | 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... |