Skip to main content
JudgeKit
Practice
Playground
Contests
Rankings
Submissions
Community
Sign in
Loading...
Problem
Editorial
Accepted Solutions
Problem discussion
Back
영속 세그먼트 트리
Try in playground
Sign in to submit
Time Limit: 5000 ms
Memory Limit: 256 MB
Ruby V
9
Author: Super Admin
자료구조
세그먼트 트리
v
i
i
i
초기 배열은 0번 버전이다.
제한
1
≤
N
≤
100
,
000
1 \le N \le 100,000
1
≤
N
≤
100
,
000
1
≤
Q
≤
100
,
000
1 \le Q \le 100,000
1
≤
Q
≤
100
,
000
1
≤
i
≤
N
1 \le i \le N
1
≤
i
≤
N
1
≤
x
≤
10
9
1 \le x \le 10^9
1
≤
x
≤
1
0
9
배열의 초기 원소는
1
1
1
이상
10
9
10^9
1
0
9
이하의 정수이다.
쿼리에서 주어지는
v
v
v
는 항상 이미 존재하는 버전 번호이다.
Ruby V
9