본문 바로가기 메뉴 바로가기

MathTrauma

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

MathTrauma

검색하기 폼
  • 분류 전체보기 (128)
    • Mathematics (11)
      • Number Theory (5)
      • Real Analysis - 단편 (4)
      • Latex (1)
      • Inequality (1)
    • DS\Algo (84)
      • Dynamic Programming (16)
      • Tree (5)
      • Segment Tree (11)
      • 최단 경로 (5)
      • Mathematics (5)
      • Binary Search (1)
    • Programming Language (27)
      • Shell Programming (9)
      • Python3 and Ruby (3)
      • JavaScript [초급 -완결] (12)
      • C++ (3)
    • Computer 일반 (6)
      • Blender (1)
      • Jupyter Lab (1)
      • VIM (3)
      • Mac (1)
  • 방명록

Lea (1)
BOJ 3584 Nearest Common Ancestors

문제 링크 : https://www.acmicpc.net/problem/3584 3584번: 가장 가까운 공통 조상 루트가 있는 트리(rooted tree)가 주어지고, 그 트리 상의 두 정점이 주어질 때 그들의 가장 가까운 공통 조상(Nearest Common Anscestor)은 다음과 같이 정의됩니다. 두 노드의 가장 가까운 공통 조상은, 두 www.acmicpc.net 주어진 문제는 root 가 주어진 tree 에서 최소(?)의 공통 조상을 찾기를 요구하는데... 노드(정점) 집합의 크기로 보아 lca(least comman ancestor) 와 관련된 기술을 쓰지 않아도 될 것으로 보인다. 하지만 분류상 '최소공통조상'에 들어 있는 문제이니, 하라는 대로 했다. 각 노드가 자신의 부모만 알고 있..

DS\Algo/Tree 2022. 8. 26. 02:35
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • bash
  • 백준
  • RUBY
  • bash script
  • persistent segment tree
  • Dijkstra
  • nearest common ancestor
  • python3
  • Shell Programming
  • number theory
  • dynamic programming
  • C++ big number
  • 다익스트라
  • segment tree
  • max flow
  • 세그먼트 트리
  • fenwick tree
  • Aho-Corasick
  • Vim
  • javascript array
  • math font
  • shell
  • JavaScript
  • 정수론
  • lazy propagation
  • Reference
  • map
  • script
  • stack
  • BOJ
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바