| 
| Идёт турнир! |  | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания. 
 |  
 | 
| imesecan | 07.окт.2015 в 13:56:10 |  |  | 0 | --- Test 1 --- 5 5 4
 2 2 2 2 2
 1 5 3
 5 3 3
 2 5 3
 4 5 3
 
 --- Pattern ---
 5
 
 
 |  | imesecan | 03.фев.2017 в 13:44:11 |  |  | 1 | Sample Input 2: Restaurant 1: 0 and other restaurants (2,3,4 and 5) have two visitors.
 
 
 |  | imesecan | 04.фев.2017 в 19:40:32 |  |  | 2 | 1) The number of visitors to the restaurants are given in the second line. Your aim is to maximize the total sell within given distance. 2) If a restaurant is further than the given distance, it is not count.
 
 
 |  | imesecan | 04.фев.2017 в 19:42:01 |  |  | 3 | Yes, you will calculate shortest distance (which may pass through other restaurants). 
 
 |  
 |