[TIL_Carrotww] 7 - 22/09/06

μœ ν˜•μ„Β·2022λ…„ 9μ›” 6일
0

TIL

λͺ©λ‘ 보기
8/138
post-thumbnail

πŸ“vscode Font 적용, Algorithm

🧲 μ•Œκ³ λ¦¬μ¦˜

πŸ”— λ°±μ€€ 10217 KCM Travel
https://www.acmicpc.net/problem/10217

πŸ”λ‹€ 읡슀트라 μ•Œκ³ λ¦¬μ¦˜μΈ 쀄 μ•Œμ•˜μœΌλ‚˜ μ•„λ‹ˆμ—¬μ„œ μ• μ’€ λ¨Ήμ—ˆλ‹€...

🧲 μ½”λ“œ

import sys
import math

def solution():
    n, total_cost, tickets = map(int, sys.stdin.readline().split())
    path = [[] for _ in range(n + 1)]
    for _ in range(tickets):
        start, end, cost, time = map(int, sys.stdin.readline().split())
        path[start].append((end, cost, time))
    MAX = math.inf
    temp = [[MAX] * (total_cost + 1) for _ in range(n + 1)]
    temp[1][0] = 0

    for cost in range(total_cost + 1):
        for node in range(n + 1):
            if temp[node][cost] != MAX:
                for next_node, next_cost, next_time in path[node]:
                    if next_cost + cost <= total_cost:
                        temp[next_node][next_cost + cost] = min(temp[next_node][next_cost + cost], temp[node][cost] + next_time)
    
    result = min(temp[n])
    if result == MAX:
        print('Poor KCM')
    else:
        print(result)
        
T = int(input())
for _ in range(T):
    solution()

πŸ”— λ‚˜μ˜ μ„€λͺ… velog

🧲 vscode font 적용

πŸ”
1. Control + , -> μ„€μ • μ°½
2. Font 검색

μœ„μ™€ 같이 섀정을 ν•œλ‹€
처음 ν°νŠΈλΆ€ν„° μ μš©μ„ ν•œ ν›„ μ—†μœΌλ©΄ λ‹€μŒ 폰트λ₯Ό 적용 ν•œλ‹€.

πŸ” μœˆλ„μš°κ°€ μ„€μΉ˜ λ˜μ–΄μžˆλŠ” λ“œλΌμ΄λΈŒμ— λ“€μ–΄κ°€λ³Έ Font 파일이 μžˆλ‹€

Fonts 파일둜 λ“€μ–΄κ°€ λ‹€μš΄λ°›μ€ 폰트λ₯Ό λ„£μ–΄μ£Όλ©΄ λœλ‹€.

πŸ”JetBrains Font λ‹€μš΄ 곡식 ν™ˆνŽ˜μ΄μ§€
https://www.jetbrains.com/ko-kr/lp/mono/
μœ„ λ§ν¬μ—μ„œ 받은 ν›„ ttf νŒŒμΌμ— μžˆλŠ” κΈ€κΌ΄ νŒŒμΌλ“€μ„ Fonts 폴더에 λ„£μ–΄μ£Όλ©΄ λœλ‹€.

profile
Carrot_hyeong

0개의 λŒ“κΈ€