Блог пользователя M.A.H.M.O.O.D

Автор M.A.H.M.O.O.D, история, 7 лет назад, По-английски

Hello everyone.

I have been trying to solve 455D - Serega and Fun for a long while now and I really need some help.

I can't figure out what's wrong in my solution could someone please help me or at least give a test case where my solution will fail.

Note: I'm using SQ-RT decomposition to solve this problem and when I change the value of SQ I get WA on a different test each time.

Here's my submission : 27521539

Please help I going crazy because of this problem.

Thank you for reading.

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

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

how much would you pay

  • »
    »
    7 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится -9 Проголосовать: не нравится

    maybe debugging other people's uncommented competitive programming code is fun as a freelance job

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

If you get different outputs each time, then most likely, the problem is that somewhere in your code you access some undefined memory zone. Try asserting every memory access you do to see where the program is failing.

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

http://mirror.codeforces.com/contest/455/submission/27531234

Now debug manually.

If your code is correct it will give correct answer for any value of SQ even though it might be slow.