Search found 2 matches
Search found 2 matches • Page 1 of 1
- Sun Feb 16, 2014 7:40 am
- Forum: Volume 116 (11600-11699)
- Topic: 11635 - Hotel booking
- Replies: 39
- Views: 11081
WA plz help. I splitted towns if the town has a hotel for the driver. Use a prioirty_queue to implement the heap. Otherwise is pretty simple straight dijkstra. #include <iostream> #include <cstdlib> #include <cstdio> #include <cmath> #include <vector> #include <queue> #include <utility> using namesp...
Hey replying roticv, the post almost 10 years ago. In your posted code, the articulation test for root node might be wrong. We are not looking for "if the #no of connections from root node is more than 2". We are looking for if the # of children for root node from the resulting DFS is more than 2. A...