https://www.acmicpc.net/problem/1149 1149번: RGB거리 첫째 줄에 집의 수 N(2 ≤ N ≤ 1,000)이 주어진다. 둘째 줄부터 N개의 줄에는 각 집을 빨강, 초록, 파랑으로 칠하는 비용이 1번 집부터 한 줄에 하나씩 주어진다. 집을 칠하는 비용은 1,000보다 작거나 www.acmicpc.net 정답 code #RGB거리 import sys input = sys.stdin.readline n = int(input()) cost = [] for _ in range(n): r,g,b = map(int,input().split()) cost.append([r,g,b]) for i in range(1,n): cost[i][0] = min(cost[i-1][1],cost[i-..