Editorial for DMOPC '20 Contest 7 P1 - Bob and Balance
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Subtask 1
We can simply greedily pair
Time Complexity:
Subtask 2
This subtask was intended to reward slower solutions with the correct idea.
Time Complexity:
Subtask 3
To make things convenient, let's sort the masses in non-decreasing order.
Let's assume there is a mass appearing
Time Complexity:
Note from
Comments