macaquedev's blog

By macaquedev, history, 13 hours ago, In English

.... 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.

  • Vote: I like it
  • +74
  • Vote: I do not like it

»
13 hours ago, # |
  Vote: I like it +14 Vote: I do not like it

»
12 hours ago, # |
Rev. 2   Vote: I like it -29 Vote: I do not like it

The greatest Christmas present of all time was God's great sacrifice of His Son Jesus Christ so that we may have eternal life.

Wait nvm I confused it with Easter. Okay then I'm gonna trust you that two weak pretests is the greatest Christmas gift of all time.

  • »
    »
    12 hours ago, # ^ |
      Vote: I like it -13 Vote: I do not like it

    Read Luke 2:7-8.

    Why were shepherds out on the fields looking after their flocks if he was in fact born on December 25th, in the middle of the cold winter?

    • »
      »
      »
      12 hours ago, # ^ |
        Vote: I like it -12 Vote: I do not like it

      Because Jesus Christ likely wasn't born in the winter. Christmas is only the time when we celebrate the birth of Christ. If I recall correctly, it took over the pagan holiday Saturnalia. This was a good thing because the Romans honored fake gods.

      • »
        »
        »
        »
        12 hours ago, # ^ |
          Vote: I like it -13 Vote: I do not like it

        Well then the birth of Jesus wasn't in fact the greatest Christmas present of all time, since it didn't happen on Christmas? Just a small thought.

        • »
          »
          »
          »
          »
          8 hours ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          idk how but this is the most reddit-like comment I've ever seen