Treap debug

Back to General discussions forum

gardengnome     2023-10-11 04:20:54
User avatar

Hi Rodion,

I wonder if you could share the treap structure for the seeds S=44257 and TEST_SEED=41354 via pastebin. I get the same structure / results for the short 7-element example from the text and the best seed/average from the actual example, but get a higher worst case with the seeds given above - hence trying to debug. Thanks!

Rodion (admin)     2023-10-11 04:48:50
User avatar

Hi Mathias! Good idea, thanks!

here it is (for N=30, right?)

Sorry for format slightly differing from the smaller example, but the code was used the same, from the checker. Number after the "depth" is referring to parent (if somewhere it doesn't match then checker is supposedly wrong).

Shall add it to the problem statement too.

Hm. what a shame, probably it is just silly manual copying mistake about the worst case. Shall recheck quickly. :(

Of course it is. Thanks a lot for nailing it down, and as usual, sorry for inconvenience, I'm coveryng my head with ashes and dust :) Updated the example.

gardengnome     2023-10-11 05:07:28
User avatar

Thank you - results agree now. :)

Please login and solve 5 problems to be able to post at forum