Please read the new rule regarding the restriction on the use of AI tools. ×

OA problem: Nasrallah dead treasure

Revision en1, by v3318384, 2024-09-28 18:56:35

Nasarallah is a treasure hunter exploring a vast cave filled with tunnels. The cave system can be represented as a tree with N nodes (cave rooms) and N-1 edges (tunnels). Each tunnel has a certain weight that represents the time it takes to travel between two rooms.

Nasarallah starts in room 1, and his goal is to collect treasure hidden in different rooms of the cave. Each room has either zero or one treasure. Nasarallah can only carry one treasure at a time, so he needs to pick up the treasure from one room, return to room 1, and repeat this process for all rooms with treasure.

Given the structure of the cave, your task is to help Nasarallah minimize the total time spent collecting all the treasures and returning them to room 1.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English v3318384 2024-09-28 18:56:35 784 Initial revision (published)