Diferente pentru problema/greutati intre reviziile #14 si #15
Nu exista diferente intre titluri.
Diferente intre continut:
* $1 ≤ P ≤ 1.000.000.000$ * $0 ≤ pw[i] < P$ * $1 ≤ f[i] ≤ 1.000.000.000$
* nu vor exista perechi i si j in input astfel incat pw[i] = pw[j]
h2. Exemplu