117791 [BOJ] 백준 11779번: 최소비용 구하기 2 #include #include #include #include #include #include #include using namespace std; typedef pair pii; typedef long long ll; vector v[1001]; int dist[1001]; int pre[1001]; int n, m; int s, e; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); cin >> n >> m; memset(pre, -1, sizeof(pre)); for (int i = 1; i > a >> b >> c; v[a].push_back({ b,c }); } cin >> s >> e; priority_.. 2020. 6. 19. 이전 1 다음