# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
956461 | Darren0724 | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 485 ms | 262144 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;
#define LCBorz ios_base::sync_with_stdio(false); cin.tie(0);
#define all(x) x.begin(), x.end()
#define endl '\n'
const int N=1000005;
const int INF=1e9;
vector<int> t;
struct segtree{
struct seg{
vector<int> v;
int val=0;
}tr[N<<2];
seg merge(seg a,seg b){
seg ans;
ans.val=max(a.val,b.val);
auto &c=a.v,&d=b.v;
int ptr1=0,ptr2=0;
while(ptr1<c.size()&&ptr2<d.size()){
if(c[ptr1]<=d[ptr2]){
if(ptr2>0)ans.val=max(ans.val,c[ptr1]+d[ptr2-1]);
ans.v.push_back(c[ptr1++]);
}
else{
ans.v.push_back(d[ptr2++]);
}
}
while(ptr1<c.size()){
if(ptr2>0)ans.val=max(ans.val,c[ptr1]+d[ptr2-1]);
ans.v.push_back(c[ptr1++]);
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... |