# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17982 | suhgyuho_william | Dancing Elephants (IOI11_elephants) | C++98 | 3775 ms | 23740 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 <stdio.h>
#include "elephants.h"
#define Size 390
int n,L;
int bucket[500][1000];
int last[500][1000],picture[500][1000];
int cnt[500];
int a[150002];
void setting(int x){
int i,t;
if(cnt[x] == 0) return;
last[x][cnt[x]-1] = bucket[x][cnt[x]-1]+L;
picture[x][cnt[x]-1] = 1;
t = cnt[x]-1;
for(i=cnt[x]-2; i>=0; i--){
while(true){
if(bucket[x][t-1]-bucket[x][i] > L) t--;
else break;
}
if(bucket[x][cnt[x]-1]-bucket[x][i] <= L){
last[x][i] = bucket[x][i]+L;
picture[x][i] = 1;
}else{
last[x][i] = last[x][t];
picture[x][i] = picture[x][t]+1;
# | 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... |