@DeNissss4444

Почему в Inpute написано что нужно создать 8 значений а в примере вводят 23 значения?

Решаю задачу и не могу понять ее условие точнее раздел Input и раздел Example. Просто в Inpute написано что нужно создать 8 значений а в примере вводят 23 значения. Подскажите пожалуйста почему так?

You are given a list of cities. Each direct connection between two cities has its transportation cost (an integer bigger than 0). The goal is to find the paths of minimum cost between pairs of cities. Assume that the cost of each path (which is the sum of costs of all direct connections belonging to this path) is at most 200000. The name of a city is a string containing characters a,...,z and is at most 10 characters long.2)

Input
s [the number of tests <= 10]
n [the number of cities <= 10000]
NAME [city name]
p [the number of neighbors of city NAME]
nr cost [nr - index of a city connected to NAME (the index of the first city is 1)]
           [cost - the transportation cost]
r [the number of paths to find <= 100]
NAME1 NAME2 [NAME1 - source, NAME2 - destination]
[empty line separating the tests]


Output
cost [the minimum transportation cost from city NAME1 to city NAME2 (one per line)]


Example
Input:
1        
4         
Gdansk  
2       - 
2 1      
3 3     
Bydgoszcz  
3      
1 1
3 1
4 4
torun
3
1 3
2 1
4 1
warszawa
2
2 4
3 1
2
gdansk warszawa
bydgoszcz warszawa

Output:
3
2
  • Вопрос задан
  • 81 просмотр
Решения вопроса 1
SagePtr
@SagePtr
Еда - это святое
Потому что городов вводится несколько. В описании формата ввода фигурирует только один, остальные имеют тот же формат. Да и каждый город имеет произвольное число дорог.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы
Bell Integrator Ульяновск
До 400 000 ₽
Bell Integrator Хабаровск
До 400 000 ₽
Bell Integrator Ижевск
До 400 000 ₽
19 апр. 2024, в 03:01
1000 руб./за проект
18 апр. 2024, в 21:56
2000 руб./за проект
18 апр. 2024, в 21:00
150 руб./за проект