Comments
On Monogon → Codeforces Round #712, 6 years ago
0

Пересекается с открытием и пробным туром nerc(

+4

Thanks :D

0

You can use set to simulate the optimal moves.

+8

yes

0

I used the following approach.
Let's insert every people into set. And just delete peoples in query when query comes. Now last element of set is people who won. And now you can erase last element of set and find money. After everything is done you should insert everything you deleted.

0

You shouldn't use printf with ios base synchronisation turned off.

+4

I got passed pretest with simulation.

+3

What is answer?

+14

First time solved 4 problems. Hope they will all pass :D

On albertg → Codeforces round #382, 10 years ago
+53

and author of this problem is albertg and it is posted in 2014?