title: "N과 M (2)(15650)" category: 백준[Class-4] tags: [C++, JavaScript, 백준] date: "2021-05-27" 문제 링크 N과 M (2)(15650) C++ #include #include #include using namespace std; void doCombination(vector& origin, vector& selected, int select, int start){ if(select == 0){ for(int i=0; i i + 1); const result = doCombi(origin, +m); console.log(result.map((v) => v.join(" ")).join("\n"));
title: "최단경로(1753)" category: 백준[Class-4] tags: [C++, JavaScript, 백준] date: "2021-05-19" 문제 링크 최단경로(1753) C++ #include #include #include #include using namespace std; // 문제 풀이 함수 void solution(){ int V, E, K; cin >> V >> E >> K; // init vector graph[V+1]; for(int i=0; i> u >> v >> w; graph[u].push_back({v, w}); } // dijkstra const int INF = 0x7fffffff; vector dist(V+1, INF); priority_queue pq; p..