정수삼각형

· Algorithm
문제 https://www.acmicpc.net/problem/1932 내 풀이 첫 번째 풀이 메모리 초과로 인해서 실패했다. from collections import deque N = int(input()) tri = [] for _ in range(N) : tri.append(list(map(int, input().split()))) q = deque() dp = [0 for _ in range(N)] q.append([0,0]) while q : curDepth, curIdx = q.popleft() if curDepth == 0 : dp[curDepth] = tri[curDepth][curIdx] else : dp[curDepth] = max(dp[curDepth], tri[curDepth][c..
rookied
'정수삼각형' 태그의 글 목록