시나위

  • 홈
  • 태그
  • 방명록

1916 2

[백준] 1916 최소비용 구하기 python

https://www.acmicpc.net/problem/1916 1916번: 최소비용 구하기 첫째 줄에 도시의 개수 N(1 ≤ N ≤ 1,000)이 주어지고 둘째 줄에는 버스의 개수 M(1 ≤ M ≤ 100,000)이 주어진다. 그리고 셋째 줄부터 M+2줄까지 다음과 같은 버스의 정보가 주어진다. 먼저 처음에는 그 www.acmicpc.net import sys; input = sys.stdin.readline from heapq import heappop, heappush inf = 100000000 # 최대값 (max(N)-1) * max(w) N = int(input()) # 1000 M = int(input()) # 100000 link_list = [list() for _ in range(N ..

STUDY/Algorithm 2021.07.15

[백준] 1916 최소비용 구하기 python

www.acmicpc.net/problem/1916 1916번: 최소비용 구하기 첫째 줄에 도시의 개수 N(1 ≤ N ≤ 1,000)이 주어지고 둘째 줄에는 버스의 개수 M(1 ≤ M ≤ 100,000)이 주어진다. 그리고 셋째 줄부터 M+2줄까지 다음과 같은 버스의 정보가 주어진다. 먼저 처음에는 그 www.acmicpc.net import sys input = sys.stdin.readline from heapq import heappop, heappush N = int(input()) M = int(input()) link_arr = [list() for _ in range(N + 1)] for _ in range(M): st, en, we = map(int, input().split()) link..

STUDY/Algorithm 2021.04.29
이전
1
다음
더보기
프로필사진

하고 싶은 거 다하고 정리하는 블로그

  • 분류 전체보기 (669)
    • STUDY (529)
      • Algorithm (402)
      • C, C++ (7)
      • Python (33)
      • Rust (28)
      • Swift & iOS (16)
      • Web (10)
      • Raspberry Pi (10)
      • Others (23)
    • OTHERS (140)
      • 내 생각 (134)
      • 리뷰 (5)

Tag

프로그래머스, baekjoon, 구현, python3, 백트래킹, 브루트포스, C++, dfs, 다익스트라, BOJ, C, 그래프탐색, dp, 혼공파, python, 백준, BFS, 혼공단, 시뮬레이션, 파이썬,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바