Starship Troopers (树形dp+背包)

作为《星舰士兵》的领袖,你需要摧毁虫族基地并尽可能多地捕捉大脑。基地是一个类似树状结构的洞穴,每个房间都有一定数量的虫子,部分房间可能藏有大脑。面对新武器的实验,你需要制定策略,通过有限的士兵资源,沿独特路径快速前进,同时最大化捕捉大脑的可能性。每个房间只能经过一次,且士兵能对抗20只虫子。目标是最大化所有选中房间中大脑可能出现的总概率。这个问题需要借助计算机进行复杂计算。
摘要由CSDN通过智能技术生成

You, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge cavern, which consists of many rooms connected with tunnels. Each room is occupied by some bugs, and their brains hide in some of the rooms. Scientists have just developed a new weapon and want to experiment it on some brains. Your task is to destroy the whole base, and capture as many brains as possible.

To kill all the bugs is always easier than to capture their brains. A map is drawn for you, with all the rooms marked by the amount of bugs inside, and the possibility of containing a brain. The cavern's structure is like a tree in such a way that there is one unique path leading to each room from the entrance. To finish the battle as soon as possible, you do not want to wait for the troopers to clear a room before advancing to the next one, instead you have to leave some troopers at each room passed to fight all the bugs inside. The t

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值