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.
how much would you pay
maybe debugging other people's uncommented competitive programming code is fun as a freelance job
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.
http://codeforces.me/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.