Diferente pentru problema/tinytypes intre reviziile #5 si #6

Nu exista diferente intre titluri.

Diferente intre continut:

Now the little hero wants to compute the minimum cost of changing the data types so that he's able to represent the various integers he will have to use while processing the input without any kind of overflow.
We can use the data type $i$ in order to store integers from $0$ to $2^i - 1$. There are no negative integers in the input.
We can use the data type $i$ in order to store integers from $0$ to $2^i^ - 1$. There are no negative integers in the input.
However, he can't use too big data types either, so in order to avoid doing that, there is also a penalty for using data types bigger than the minimal size we need to use for a certain number.
For example, if he needs to represent $5$, the smallest data type necessary for storing $5$ is data type $3$, so if he uses data type $5$, the penalty we have is equal to $penalty_2$, since we used a data type two tiers higher than what we needed $5$ - $3$ = $2$.
For example, if he needs to represent $5$, the smallest data type necessary for storing $5$ is data type $3$, so if he uses data type $5$, the penalty we have is equal to $penalty{~2~}$, since we used a data type two tiers higher than what we needed $5 - 3 = 2$.
h2. Date de intrare
h2. Restricţii
* $1 ≤ n ≤ 10^5$
* $1 ≤ n ≤ 10^5^$
* $1 ≤ k ≤ 30$
* $0 &le; v[i] < 2^k$
* $0 &le; v[i] < 2^k^$
* $0 &le; cost[i][j] &le; 100$. It is guaranteed that $cost[i][i] = 0$ for all values $i$.
* $0 &le; penalty_i &le; 100$
* $0 &le; penalty{~i~} &le; 100$
h2. Exemplu

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.