문제는 여기! #include using namespace std; int N; int cost[3]; int house[1001][3]; void input() { cin >> N; for(int i=0; i> cost[0] >> cost[1] >> cost[2]; if(i==0){ house[0][0] = cost[0]; house[0][1] = cost[1]; house[0][2] = cost[2]; } else { house[i][0] = min(house[i-1][1], house[i-1][2]) + cost[0]; house[i][1] = min(house[i-1][0], house[i-1][2]) + cost[1]; house[i][2] = min(house[i-1][0], house[i-1..