- ID : UVA - 10600 - ACM Contest and Blackout
- Status : Accepted
- Type : Graph MST .
- Time : 2 Hours to Submission.
- Language : Java
- Solution :
- Find MST
- Find MST in every time you remove an edge from the Original MST
- Problems :
- Make sure the MST is not the Original MST by removing the edges from the original MST and looping through all edges.
- Make sure the second minimum MST is larger than the Original MST.
This Blog is a Personal record for All The Algorithms Problems I've Solved. It shouldn't be taken as a reference for optimal solutions because I'm just a beginner.
Showing posts with label MST. Show all posts
Showing posts with label MST. Show all posts
Tuesday, March 1, 2011
UVA - 10600 - ACM Contest and Blackout
Labels:
10600,
ACM Contest and Blackout,
Graph,
MST,
Second MST,
Uva,
UVA - 10600 - ACM Contest and Blackout
Monday, February 28, 2011
UVA - 11631 - Dark Roads
- ID : UVA - 11631 - Dark Roads
- Status : Accepted
- Type : Graph MST .
- Time : 30 Minutes to Submission.
- Language : Java
- Solution :
- Add Total Costs of Edges.
- Kruskal MST on Edges using Union-Find Algorithm
- Subtract the MST cost from the Total cost.
- Problems :
- Large Data Input so Buffered Reader & Scanner will give TLE
- Don't Use Java Standard Input readers but use this Parser Instead.
Labels:
11631,
Dark Roads,
Graph,
MST,
Uva,
UVA 11631 Dark Roads
UVA - 10307 - Killing Aliens in Borg Maze
- ID : UVA - 10307 - Killing Aliens in Borg Maze
- Status : Accepted
- Type : Graph MST & BFS.
- Time : 5 Hours to Submission.
- Language : Java
- Solution :
- Assume 'S' is a normal node as 'A'
- BFS on all Nodes and Find all Edges.
- Kruskal MST on Edges using Union-Find Algorithm
- Problems :
- hashCode() Function shouldn't be implemented without equals()
- Hashing should be avoided with pre-indexing.
Subscribe to:
Posts (Atom)