제출 #1111966

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
11119662024-11-13 12:57:13abczz서열 (APIO23_sequence)C++17
0 / 100
1869 ms80108 KiB
#include "sequence.h"
#include <iostream>
#include <vector>
#include <array>
#define ll int
using namespace std;
vector <ll> V[500000];
struct SegTree{
ll st[4][2000000], lazy[4][2000000];
void push(ll id) {
for (int i=0; i<4; ++i) {
if (!lazy[i][id]) continue;
st[i][id*2] += lazy[i][id];
st[i][id*2+1] += lazy[i][id];
lazy[i][id*2] += lazy[i][id];
lazy[i][id*2+1] += lazy[i][id];
lazy[i][id] = 0;
}
}
void update(ll id, ll l, ll r, ll ql, ll qr, ll z, ll w) {
if (qr < l || r < ql) return;
else if (ql <= l && r <= qr) {
st[z][id] += w;
lazy[z][id] += w;
if (!z) st[1][id] += w, lazy[1][id] += w;
return;
}
push(id);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...