비트마스킹2 백준 24519번 : Bottleneck TSP (Large) (Python) 출처 : https://www.acmicpc.net/problem/24519 n, m = map(int, input().split()) INF = int(1e8) graph = [[INF] * n for _ in range(n)] for _ in range(m) : u, v, c = map(int, input().split()) graph[u-1][v-1] = c dp = [[0] * (1 2023. 3. 24. 백준 13701번 : 중복 제거 (Python) 출처 : https://www.acmicpc.net/problem/13701 import sys arr = bytearray(2**22) s = "" while True : c = sys.stdin.read(1) if c.isnumeric() : s += c else : n = int(s) d = n // 8 r = n % 8 if not arr[d] & (1 2023. 3. 20. 이전 1 다음