The best Christmas present of all time.....

Revision en1, by macaquedev, 2024-12-25 03:43:38

.... is having weak pretests on not one, but TWO problems in today's Div2 round...

To all the people I hacked on A (including GM Hamed_Ghaffari), I'm sorry. It's such an unbelievably braindead hack. All I had to do to hack you guys was find a number just below a very very big power of 4 (288230376151711674 worked), and then the log functions output some form of overflowed garbage that made your solutions output a number that was twice as big as it should have been.

On C, somehow we had blatantly O(n^2) solutions getting unpunished, for example this one: 298315499

This works well for random tests (because the alternating 1's and -1's make the range of possible sums quite small, so just doing an unoptimised:

~~~~~ for (auto i : st1) { for (auto j : st2) { ans.insert(i + j + arr[pos]); } }~~~~~

works... but it's very obvious how to make a countertest (just have lots of 1's, then 100000, then lots of -1's, then you have a nested loop that runs about 10^10 times, which will obviously TLE in any language)

It's just so sad when tests that are this obvious don't get added to the pretests.

Tags hacks, weak pretest

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English macaquedev 2024-12-25 03:46:51 2 Tiny change: '\n }\n}~~~~~\n\n\' -> '\n }\n}\n~~~~~\n\n\'
en1 English macaquedev 2024-12-25 03:43:38 1218 Initial revision (published)