# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
890719 | NotLinux | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 2597 ms | 255228 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 <bits/stdc++.h>
using namespace std;
const int N = (1 << 20) + 7;
const int inf = 2e9 + 7;
// bool debug_mode = 0;
inline int closest(vector < int > &v , int x){
auto it = lower_bound(v.begin() , v.end() , x);
if(it == v.begin()){
return -1;
}
else{
return *(--it);
}
}
struct MergeSortTree{
vector < int > tree[2*N];
int sz;
void merge(vector < int > &a , vector < int > &b , vector < int > &c){
int pa = 0 , pb = 0;
while(pa != (int)a.size() or pb != (int)b.size()){
if(pa == (int)a.size()){
c.push_back(b[pb++]);
}
else if(pb == (int)b.size()){
c.push_back(a[pa++]);
}
else{
if(a[pa] < b[pb]){
c.push_back(a[pa++]);
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |