SuperMo's blog

By SuperMo, history, 2 weeks ago, In English

how to solve problems like this div2 should I just start throwing random stuff for half an hour like, try sort based on first, try sort based on second , try sort based on max, try sort based on min, try sort based on sum , try sort based on max-min

is this the optimal strategy? I'm not joking.

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By SuperMo, history, 2 months ago, In English

Hi in problem C today the hard part is not the bezout it's the fact the when the linear combination might have some negative numbers it's still possible to apply it in our problem

I asked the author and he told me that:

if you add a or b to all the elements except ci , it is the same as decreasing a or b from ci . So it doesn't matter if X,Y are negative.

but I'm still confused like I would never in 100 years come up with this observation. so I want to ask you guys how did you knew that the negative combination is ok intuitively ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By SuperMo, history, 2 months ago, In English

I need problems which involves some combined arithmetic and geometric series and not just the basic ones can you provide any such problems thanks in advance

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By SuperMo, history, 4 months ago, In English

Hi in problem B of last contest the answer is ∑(pi−ai)+max(pi−ai) now I don't get the max(pi−ai) part I know what it's but I don't know how did we derive it can someone help ?

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By SuperMo, 4 months ago, In English

Hi, in problem C of the last educational round, why is it wrong to loop from 1 to n and increase the minimum if both are equal to 1, and decrease the maximum if both are -1?

How did so many people know that this was wrong and decide to first calculate the guaranteed rating of the first movie and the guaranteed rating of the second movie, and only then apply the greedy algorithm of decreasing the maximum and increasing the minimum? What is the difference, and how can I notice it?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By SuperMo, history, 5 months ago, In English

in problem F the binary search approach why is this equation wrong with large numbers but it works with small numbers

number of time we use current attack = ceil(mid/(c[i]+1))

Update : it's because of the cool down you don't need to wait c[i] round to hit again you actually wait c[i]-1 round so ceil(mid/c[i]) is correct

Full text and comments »

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