Комментарии
На Monogon → Codeforces Round #712, 6 лет назад
0

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

Kак решать J?

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
+4

Thanks :D

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
0

You can use set to simulate the optimal moves.

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
+8

yes

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
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.

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
0

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

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
+4

I got passed pretest with simulation.

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
+3

What is answer?

На pitfall → Codeforces Round #388 (Div. 2), 10 лет назад
+14

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

На albertg → Codeforces round #382, 10 лет назад
+53

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