# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
302259 | TMJN | Ancient Books (IOI17_books) | C++17 | 2 ms | 512 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 "books.h"
#include <bits/stdc++.h>
using namespace std;
int p,h,POS[1000000],tree[1<<21];
long long d;
vector<int>P;
void movel(int x){
for(int i=p;i>=x;i--){
if(h>P[i]){
swap(h,P[i]);
}
}
d+=p-x;
p=x;
}
void mover(int x){
for(int i=p;i<=x;i++){
if(h<P[i]){
swap(h,P[i]);
}
}
d+=x-p;
p=x;
}
void update(int x){
x+=1<<20;
# | 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... |