blueberry

  • 홈
  • 태그
  • 방명록

segment_tree 1

Codeforces Round #684 (Div. 2) Greedy Shopping

codeforces.com/contest/1439/problem/C Problem - C - Codeforces codeforces.com 구간 합을 구하고 변경해야 하므로 segment tree로 푸는 문제로 보인다. ecnerwala solution (codeforces.com/contest/1439/submission/98717653) 을 참고했다. segment tree가 뭐지? 배열 구간 (a,b)의 합을 lonN 시간에 구하고 logN의 시간에 수정 할 때 이용되는 이진 트리 구조이다. 시간 복잡도 : O(N) 공간 복잡도 : O(N*2) 최상 위 노드는 (1,N) 합 값을 갖는다. 부모 노드의 구간이 (a, b) 일 때, mid = (a+b)/2라 하면 왼쪽 자식과 오른쪽 자식은 각각 (a,..

개발/ps 2020.11.22
이전
1
다음
더보기
프로필사진

blueberry

run and learn

  • 분류 전체보기 (12)
    • 개발 (11)
      • 생산성 (3)
      • Android (2)
      • Design Pattern (0)
      • Code review (3)
      • ps (2)
    • IT소식 (0)
    • English (0)

Tag

parity, linux, Java, Troubleshooting, kakaotalk, Android, 생산성, coding, seg_tree, ubuntu, PS, binary_tree, segment_tree, GREEDY, vscode, IBUS, unittest, 인포그래픽, code-review, Codeforces,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바