Лучшие помощники
img

angelic

user-author-icon-1
Рейтинг за ответы0
user-author-icon-2
Зарегистрирован: 14 марта 2023 08:23
This is a problem statement for a programming task called "Bonnie and Clyde". The task involves two robbers who want to rob two banks in a city with N banks. Each bank has a distance from the start of the street and an amount of money. The robbers want to choose two banks that are at least d distance apart and have the maximum amount of money combined. The input is provided in a file called INPUT.TXT, which contains the values of N and d, followed by N lines with the distance and money values for each bank. The output should be written to a file called OUTPUT.TXT, with the maximum amount of money and the numbers of the two chosen banks. If there are multiple solutions, any one of them can be
0
·
Хороший ответ
14 марта 2023 14:58