gpt4 book ai didi

algorithm - 无法找出以下问题的算法

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:52:29 25 4
gpt4 key购买 nike

<分区>

我只对问题陈述有疑问,我不想要实现。如果你能给我一个想法,我会尝试接近自己。

我正在解决 Doomsday问题,我没有得到这一行:

Government built pi pods in each city to carry people in case of any calamity which will transport them to Earth and self-destruct.

我知道人们坐在 pod 里,但坐在 pod 里后他们要去哪里?假设有5个城市(1,2,3,4,5),每个城市都有一些人口,目标城市(顶点)应该作为拯救他们生命的目的地?

问题描述:

Today was just a regular day for everyone in Krypton until a news flashed that a meteor is going to destroy Krypton in X minutes.

Krypton has N cities connected together by bidirectional roads.ROAD DESCRIPTION: It takes t minutes to travel from ith city to some city jth where 1<=i,j<=N given in the format i j t. Government built pods in each city to carry people in case of any calamity which will transport them to Earth and self-destruct. Each city has qi population. As soon as the people hear this news they try to save themselves by acquiring these pods either at their own city or in other city before the meteor destroys everything. Note that a pod can carry only one person.

Give the minimum numbers of people who will die.Refer example for clarification.

问题链接:Doomsday

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com