(c++) 프로그래머스 "배달"
https://programmers.co.kr/learn/courses/30/lessons/12978 코딩테스트 연습 - 배달 5 [[1,2,1],[2,3,3],[5,2,2],[1,4,2],[5,3,1],[5,4,2]] 3 4 6 [[1,2,1],[1,3,2],[2,3,2],[3,4,3],[3,5,2],[3,5,3],[5,6,1]] 4 4 programmers.co.kr 나의 풀이 #include #include #include using namespace std; int solution(int N, vector road, int K) { vector way(N + 1); vector weight; stack togo; int answer = 0; for (int i = 0; i tmp.second) {..
2022. 4. 30.