Function ADS::bribes
Defined in File Problems.h
Function Documentation
-
inline std::optional<std::vector<long>> ADS::bribes(std::vector<long> M, const std::vector<bool> &ps)
mazzette(): the n bribes M to the n politicians, ps[ i ] if the i-th is of the PS, so that the PS gets twice the PDF; the bribe of each politician, or nothing
- Pre:
M and ps have the same size
- Post:
the bribes returned are a permutation of M