Submission #255289

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2552892020-07-31 17:08:57model_codeProgression (NOI20_progression)C++17
100 / 100
793 ms67576 KiB
#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
struct node {
i64 left_s;
i64 left_c;
i64 right_s; // the value of the rightmost elem
i64 right_c;
int left_len;
int right_len;
int curr_len;
// these have already been pre-applied to the above info
bool is_override;
i64 push_s;
i64 push_c;
};
constexpr int DEPTH = 19;
node stree[1 << (DEPTH + 1)];
void construct(int i){
node& me = stree[i];
node& left=stree[i<<1];
node& right=stree[(i<<1)+1];
const int mylen = 1 << (__builtin_clz(i) - (31 - DEPTH));
const int childlen = mylen >> 1;
if (childlen==1) {
right.right_c = left.left_c = right.left_c = left.right_c = right.left_s - left.right_s;
}
me.curr_len=max(left.curr_len,right.curr_len);
int lmergelen =
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...