Pagini recente » Diferente pentru admin/task-ratings-guidelines intre reviziile 31 si 32 | Istoria paginii utilizator/dimatc | Diferente pentru problema/minperm intre reviziile 4 si 5
Nu exista diferente intre titluri.
Diferente intre continut:
The beautiful city of Julcvari decided to host a city tour(online, of course). They have $n$ different attractions, the $i$`th one having a beauty equal to $i$. An initial order for the presentation of the attractions has been selected, but the people of Julcvari started worrying that it might not be the best one.
They believe that the best order for visiting the attractions is the one for which the number of pairs of attractions ($i, j$), where $i$ was visited before $j$ but $i$ is more beautiful than $j$ is minimised. But organizing events is not so easy, a lot of paperwork needs to be done in order to change something like this.
They believe that the best order for visiting the attractions is the one for which the number of pairs of attractions (i, j), where $i$ was visited before $j$ but $i$ is more beautiful than $j$ is minimised. But organizing events is not so easy, a lot of paperwork needs to be done in order to change something like this.
So, the host managed to get $k$ swap plans: let $l_1$, $l_2$, ..., $l_k$ be an array of integers representing the swap plans. The host can perform any number of swaps on the initial order, such that the swapped positions are at a distance equal to one of the elements from array $l$. There is not much time left, so the people of $Julcvari$ ask you for help in finding the best order in which the attractions are presented.
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.