OSNIM

    반응형

    ProblemSolving/Segment Tree 1

    백준 14427 수열과 쿼리 15 (파이썬)

    문제 : https://www.acmicpc.net/problem/14427 제출코드 (정답) import sys input = sys.stdin.readline print = sys.stdout.write class Node(): def __init__(self, index, value): self.index = index self.value = value def update(index, value): global base, N, arr, M, base, cnt, segmentTree p = base + index segmentTree[p] = Node(index, value) p //= 2 while p >= 1: left, right = p * 2, p * 2 + 1 # 최소값 우선 순위 # 수열에..

    ProblemSolving/Segment Tree 2022.12.03
    1
    반응형
    더보기
    • 분류 전체보기 (159)
      • ProblemSolving (126)
        • DP (18)
        • BFS, DFS, 백트래킹 (15)
        • 구현, 시뮬레이션, 완전탐색 (21)
        • 정렬 (6)
        • Greedy (4)
        • SQL (8)
        • Hash (5)
        • Stack, Queue (6)
        • Heap (2)
        • Graph (2)
        • Binary Search (5)
        • 투 포인터 (7)
        • Brute force (3)
        • Mathematics (6)
        • String (11)
        • Bit Masking (1)
        • Recursion (2)
        • Tree (1)
        • Divide & Conquer (1)
        • Segment Tree (1)
        • Linked List (1)
      • 자바 스프링 (22)
      • jeykll theme (0)
      • 오디세이 스킨 (1)
      • CS (2)
        • 네트워크 (1)
        • 운영체제 (0)
        • 시스템 프로그래밍 (1)
      • SSAFY (5)
      • Android (0)
        • Flutter (0)

    최근글

    인기글

    최근댓글

    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

    Copyright © Kakao Corp. All rights reserved.

    티스토리툴바