Poseidon913's blog

By Poseidon913, history, 3 months ago, In English,

Please, can anyone explain the Problem B "996B — World Cup" of Codeforces Round #492 happened on 24/06/18. I couldn't completely understand the explanation without any solution code provided(like it used to be in previous contests.)

 
 
 
 
  • Vote: I like it  
  • -4
  • Vote: I do not like it  

»
3 months ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

Suppose you have the numbers

Unable to parse markup [type=CF_TEX]

What is the length when you visit them in round 1 ?

Unable to parse markup [type=CF_TEX]

You visit queue i at size

Unable to parse markup [type=CF_TEX]

in round 1

After that notice if you visit a queue at size t, you also visit it at size

Unable to parse markup [type=CF_TEX]

.

Now, how many visits do you make at a queue when it is 0 ?

The answer is

Unable to parse markup [type=CF_TEX]

So, for each queue calculate the time it will take to reach it and keep track of the minimum.

Here is my code.