Блог пользователя ko_osaga

Автор ko_osaga, история, 7 лет назад, По-английски

Hi all!

Did you know that SRM 763 is scheduled in 15:00 July 17, 2019 UTC+0? I didn't, and I bet you also didn't, so here is a helpful reminder.

Let's wait for hmehta to announce the writers.

And, don't forget the TCO19 Round 3B!

  • Проголосовать: нравится
  • +53
  • Проголосовать: не нравится

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Yup, and unforturnately it conflicts with the todays round at Codeforces ..

»
7 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится
»
7 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится +3 Проголосовать: не нравится

Uhh, so, in div1-500 according to my solution the answer to the last example is equal to 166346919873852152, which is less than intended 166346919874650680.

I spent ~30 minutes trying to understand why is it wrong and didn't succeed at it. Can you help me out? Maybe, provide some smaller testcase on which my solution produces incorrect output... My solution: Vxf2zW

My solution just straight-forwardly checks costs for all possible roots with some speed-ups from segment tree, so if there is a mistake at all, it should be in implementation, but I couldn't find it. What was the intended one?..