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

Автор SendThemToHell, история, 4 года назад, По-русски

Today I have discovered a strange fact about problem D from SNSS round 5.

I believe, most of the accepted solutions were something like "do ternary search over the angle/x-coordinate". It was somewhat hard for me to squeeze it into TL, so I had to do only 20 iterations to get accepted. Today I decided to find out, what is the minimum number of iterations of ternary search required to get AC. Turned out that this number is equal to... 0. The code which gives AC is listed below.

Spoiler

I believe that this code takes the intersection of the bisector of AB and the circle as optimum, which is definitely wrong. Am I missing something?

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

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

Wait I wondered that too. My code did some nonsense but was getting correct answers on the examples and I didn't understand why it passed. Apparently puts("0.0") passes as well.

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

    Wow, i just checked it, and even an empty file sent under python gets AC) It would be really interesting to see the number of solutions that actually pass all the testcases

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

It seems that custom checker from stock testlib (rcmp-6) loaded wrongly to the Yandex.Contest. (. I cannot understand reasons, so i changed to other builtin equivalent. Check if effect still stays...