one Book a Day

  • 홈
  • 태그
  • 방명록
  • GitHub

20007 1

[백준][Python] 20007 떡돌리기

점에서 각 집까지 최소거리 = 대놓고 다익스트라. 처음엔 조건 못보고 dp그려야하나 고민하고 있었는데 다시보니 가까운 순서로 방문이라고 대놓고 써줘서 다익스트라 결과값 정렬때린다음 반복문 으로 쉽게 해결했다. import sys input = sys.stdin.readline from heapq import heappop,heappush # 1. 0번에서 각 집에 가는 최소거리. -> 다익스트라 def dijkstra(start): heap = [] dp_dists[start] = 0 heappush(heap,[dp_dists[start],start]) while heap: cur_dist,cur_node = heappop(heap) for next_node,next_dists in graph[cur_n..

practivceAlgorithm/백준 2021.07.26
1
더보기
프로필사진
  • 분류 전체보기 (720)
    • webDeveloper (11)
      • Browser (5)
      • Test (1)
    • frontend (50)
      • HTML (6)
      • CSS&Design (14)
      • JavaScript (16)
      • TypeScript (2)
      • React (8)
      • 상태관리 (2)
      • d3.js & three.js (1)
    • backend (21)
      • Node.js (0)
      • Django&Python (15)
      • Java (2)
      • Spring Boot (0)
      • DB (4)
    • practivceAlgorithm (570)
      • 자료구조&알고리즘 (29)
      • PYTHON 기능연습 (11)
      • 백준 (379)
      • swexpertacademy (84)
      • programmers (23)
      • codeforce (20)
      • LeetCode (0)
      • 다시 봐야할 문제들 (22)
    • Computer Science (37)
      • 소프트웨어 공학 (9)
      • 네트워크 (10)
      • 운영체제 (7)
      • 컴퓨터 구조 (4)
      • DB (2)
      • 모델링 & 아키텍쳐 & 패턴 (3)
      • IOT (2)
    • GitHub&Git (7)
    • 후기 (3)
    • IDE (1)
    • Memo (1)

Tag

dfs, 비트마스킹, 백준, http, 슬라이딩 윈도우, React, codeforce 702, 2018, kakao 2018, Python, kakao 2019, 비트마스크, BOJ, DP, 다익스트라, TRIE, JS 30, JS, 파이썬, 분할정복,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Archives

Calendar

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

티스토리툴바