Pagini recente » Diferente pentru problema/monopoly intre reviziile 42 si 31 | Diferente pentru utilizator/gerd13 intre reviziile 89 si 2 | Diferente pentru utilizator/informatician28 intre reviziile 16 si 17 | Diferente pentru problema/monopoly intre reviziile 34 si 35 | Diferente pentru problema/monopoly intre reviziile 42 si 34
Nu exista diferente intre titluri.
Diferente intre continut:
your magic dice to cheat.
The game is played on a board, made of $N$ cells arranged in a circle. The cells are numbered from $0$ to $N-1$, with cells $N-1$ and $0$ being adjacent.
Each cell has a tax value <tex> T_i </tex> associated with it. Every time a player lands on a cell, he has to pay the tax value of that cell (the tax value can be negative, meaning that the player receives money).
Each cell has a tax value T ~i~ associated with it. Every time a player lands on a cell, he has to pay the tax value of that cell (the tax value can be negative, meaning that the player receives money).
Carlo starts on cell $0$ and will play $K$ turns of monopoly. Each turn he rolls two $6$-sided dice and moves forward by the sum of the two values.
He then pays the tax value of the cell he lands on. If the two dice value are equal, after moving and paying, he {**must**} continue and roll the dice again.
h2. Date de intrare
The first line contains the integers $N$ and $K$.
The second line contains $N$ integers <tex> T_i </tex>.
The first line contains the integers $N$ and $K$ (1 ≤ $N$ ≤ $1000$), (1 ≤ $K$ ≤ $1000$).
The second line contains $N$ integers T ~i~ (-10^9^ ≤ T ~i~ ≤ 10^9^).
h2. Restricţii
h2. Date de ieşire
For tests worth $20$ points, $K = 1$.
For tests worth $30$ more points (1 ≤ $N$ ≤ $100$), (1 ≤ $K$ ≤ $100$).
You need to write a single line with an integer: the amount of money Carlo loses during the game.
h2. Restricţii
h2. Date de ieşire
* 1 ≤ $N$ ≤ $1000$
* 1 ≤ $K$ ≤ $1000$
* -10^9^ ≤ <tex> T_i </tex> ≤ 10^9^
* For the first subtask, $K = 1$.
* For the second subtask, (1 ≤ $N$ ≤ $100$), (1 ≤ $K$ ≤ $100$).
You need to write a single line with an integer: the amount of money Carlo loses during the game.
h2. Exemplu
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.