제출 #1126243

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
11262432024-12-12 14:44:21dwuyWeirdtree (RMI21_weirdtree)C++20
0 / 100
16 ms1604 KiB
#include "weirdtree.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
struct Node{
ll fm, sm, cm, lz, sum;
Node() : fm(0), sm(-2), cm(0), sum(0) {}
};
struct SMT{
ll n;
vector<Node> tree;
SMT(ll n = 0) : n(n), tree(n<<2|3, Node()) {};
void down(ll id){
if(tree[id].lz == 0) return;
ll delta = tree[id].lz;
tree[id<<1].lz += delta;
tree[id<<1].fm += delta;
tree[id<<1].sum += delta * tree[id<<1].cm;
tree[id<<1|1].lz += delta;
tree[id<<1|1].fm += delta;
tree[id<<1|1].sum += delta * tree[id<<1|1].cm;
tree[id].lz = 0;
}
void update(ll id){
Node &L = tree[id<<1];
Node &R = tree[id<<1|1];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...