c++ 2912번 백설공주와 난쟁이 (백준)
#include #include #include using namespace std; //입력을 받을 배열, merge sort tree을 구성할 vector들 int arr[300001]; vector tree[1200001]; void update(int s, int e, int node, int index, int val) { //merge sort tree 수정 if(s > index || e < index) return; tree[node].push_back(val); if(s==e) return; int m = (s+e)/2; update(s, m, node*2, index, val); update(m+1, e, node*2+1, index, val); } int find(int s, int ..
c++/BAEKJOON
2023. 7. 8. 03:09
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 스택
- 오프라인 쿼리
- 6198번
- C언어
- 누적 합
- 16120번
- DP
- java
- find
- 카드
- 6198
- 백준
- 덱
- 누적합
- Krustal
- C++
- 1835
- BFS
- Mo.s
- 1835번
- 그리디
- 플로이드
- 최대공약수
- union
- 최소 스패닝 트리
- 트리
- 정렬
- DFS
- 세그먼트 트리
- 그래프
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함