Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

OA problem: Nasrallah dead treasure

Правка en1, от 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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский v3318384 2024-09-28 18:56:35 784 Initial revision (published)