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

Автор Agnimandur, история, 2 года назад, По-английски

All problems were created and prepared by me and magnus.hegdahl. Thanks to BucketPotato, Monogon, and Priyam2k for valuable feedback and testing. Special thanks to MikeMirzayanov for coming up with the idea and preparing the unique checker for 1663H - Cross-Language Program. I hope you enjoyed the contest, and found it to be an interesting series of puzzles.

Example solution code written by Agnimandur is provided for each problem.

1663A - Who Tested?

Clue 1
Clue 2
Solution
Solution Code (Python)

1663B - Mike's Sequence

Clue 1
Clue 2
Clue 3
Solution
Solution Code (Python)

1663C - Pōja Verdon

Clue 1
Clue 2
Solution
Solution Code (Python)

1663D - Is it rated - 3

Clue 1
Clue 2
Solution
Solution Code (Python)

1663E - Are You Safe?

Clue 1
Clue 2
Solution
Bonus Clues (for other problems)
Solution Code (C++)

1663F - In Every Generation...

Clue 1
Clue 2
Clue 3
Solution
Solution Code (Python)

1663G - Six Characters

Clue 1
Clue 2
Clue 3
Solution
Solution Code (Python and Javascript)

1663H - Cross-Language Program

Solution
Разбор задач April Fools Day Contest 2022
  • Проголосовать: нравится
  • +92
  • Проголосовать: не нравится

»
2 года назад, # |
Rev. 3   Проголосовать: нравится +120 Проголосовать: не нравится
meme
»
2 года назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

I did all possible word searches (normal, normal with diagonal, normal with diagonal with reverse, straight up grid BFS) for "MINOTAUR" and then for both "MINOTAUR" and "THESEUS" but didn't consider doing for just "THESEUS", fml

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +6 Проголосовать: не нравится

    I did all possible word searches for theseus, got WA. Then I did only the forward-diagonal (i.e. [i0+k][j0+k]) search and got AC. Meanwhile the editorial says you had to do horizontal and vertical searches too. Who's in the right?

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      Test cases were a bit weak, you had to do horizontal, vertical, and diagonal.

      • »
        »
        »
        »
        2 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        IMO it is quite mean, that testcases had backwards-going "theseus" in them but were not considered safe. :D I checked for theseus first (but was also checking theseus backwards ord the other diagonal) but it only passed test 1. Then I checked for minotaur && !theseus as the unsafe condition and got to case 5.

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    same, smh

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

I printed "red panda" for problem A and got accepted???

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +43 Проголосовать: не нравится

    Ha ha that's an easter egg :)

    Problem A accepts either "bucketpotato" or "red panda" (or various similar combinations).

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

Is it normal that i wrote program writing "Red panda" for A?

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

what is meant by "AGC" in problem D?

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

is it rated?

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

What the actual f-k?

https://codeforces.com/contest/1663/submission/152390392

import random
print("YES" if random.randint(0, 100) % 2 else "NO")

This gets AC in E.

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    At first I thought that the generator used the same rng, but surely it doesn't work like this, right?

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +56 Проголосовать: не нравится

    E has 9 tests, so in theory there's a 1/512 chance of this happening lol.

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Rejudge and see how lucky they really are lmao

    • »
      »
      »
      2 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

      Actually, if I recall correctly, CF re-runs your submission two more times in case of getting wrong answer. So the probability of failing all three attempts is $$$\frac{1}{8}$$$, probability of guessing answer in one test case is $$$\frac{7}{8}$$$, while you get AC with $$$\left(\frac{7}{8}\right)^9 \approx 0.3$$$ probability. Really worth a try!

      UPD: It seems that I confused WA and TLE solutions. While it is rather a well-known fact that CF re-runs TLE solutions, it is very strange to do it also with WA ones. Does CF really do it? Is it right to behave so?

      • »
        »
        »
        »
        2 года назад, # ^ |
        Rev. 3   Проголосовать: нравится +26 Проголосовать: не нравится

        CF doesn't seem to do it, because if codeforces actually did it and the chance of bypassing all 9 test with a random solution was 0.3, then with 10 tries i should get AC with 97.8% probability, but i don't. That only can mean that CF make only one attempt on failure or that i'm very unlucky :)

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +28 Проголосовать: не нравится

    You should try playing poker.

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    You have chance to pass any problem if you are lucky. Just pring random strings.

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

can anyone tell me why I am getting WA in E? I did just like in editorial :(. My submission

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It is RATED! WTF???

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

problem G Hard-coding strings solution code isn't available

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

I guess the rating changes are only for today .

»
2 года назад, # |
  Проголосовать: нравится +34 Проголосовать: не нравится
Another Solution of H
»
2 года назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Are the rating updates an April Fool's joke?

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Submission Any particular reason why this code for C wasn't accepted?

»
2 года назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

Well, it is rated :D

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

I write my user name in A get wrong Why

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

During the contest, after studying Pascal for an hour, I found a clumsy solution for H.

code

I wonder what I was doing :<

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

How can I become a expert? It is so hard!!!!!!!!!! T_T