[C++] 백준 1939 중량제한
·
Algorithm/Baekjoon
#include #include #include #include using namespace std; const int MaxNum = 100001; int n, m, start, finish; bool visited[MaxNum]; vector nodes[MaxNum]; bool BFS(int cost); int main() { ios_base::sync_with_stdio(0); cin.tie(0); int lowCost, highCost, maxCost; cin >> n >> m; for (int i = 0; i > temp1 >> temp2 >> temp3; nodes[temp1].push_back({ temp2, temp..