Diferente pentru blog/resourcehog intre reviziile #9 si #8

Nu exista diferente intre titluri.

Diferente intre continut:

To paraphrase, the problem asks for a data structure with the following operations
* use_resources(name, quantity) which does resources[name] += quantity (quantity can also be negative)
* use_resources(name, quantity) which does resources[name] += quantity
* get_approximate_max() which returns name1 such that max(resources[name]) / 2 <=  resources[name1] <= max(resources[name])
Using a map in combination with heap gives us a solution with O(log n) time for each of the two operations. Can we do better?

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.