세그먼트 트리 #64
세그먼트 트리
#64
Replies: 5 comments
-
추가 풀이한 문제 (리드미에 없음)
|
Beta Was this translation helpful? Give feedback.
0 replies
-
11659. 구간 합 구하기 4#include <iostream>
using namespace std;
int psum[100'001];
int main(){
ios::sync_with_stdio(0); cin.tie(0);
int N, M; cin >> N >> M;
for (int i = 1; i <= N; ++i) {
cin >> psum[i];
psum[i]+=psum[i-1];
}
int a, b;
while(M--){
cin >> a >> b;
cout << psum[b]-psum[a-1] <<"\n";
}
return 0;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
2042. 구간 합 구하기 (코드)
|
Beta Was this translation helpful? Give feedback.
0 replies
-
10999. 구간 합 구하기 2 (코드)
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Persistent Segment TreeEgg 문제, 풀이 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
리드미
Beta Was this translation helpful? Give feedback.
All reactions