Блог пользователя macaquedev

Автор macaquedev, история, 24 часа назад, По-английски

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

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

»
24 часа назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

»
23 часа назад, # |
Rev. 2   Проголосовать: нравится -30 Проголосовать: не нравится

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.

  • »
    »
    23 часа назад, # ^ |
      Проголосовать: нравится -13 Проголосовать: не нравится

    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?

    • »
      »
      »
      23 часа назад, # ^ |
        Проголосовать: нравится -13 Проголосовать: не нравится

      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.

      • »
        »
        »
        »
        23 часа назад, # ^ |
          Проголосовать: нравится -13 Проголосовать: не нравится

        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.