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

Автор MikeMirzayanov, история, 10 лет назад, По-русски

Привет, Codeforces!

У меня появилось желание перед Good Bye 2016 хорошенько проверить, что всё работает как надо.

Приглашаю вас принять участие в Testing Round 13. Старт состоится 29-го декабря в 12:05. Раунд будет неофициальным, нерейтинговым. Продолжительность: 75 минут.

Претесты будут необычно слабыми, чтобы спровоцировать побольше взломов.

Ждите интерактивных задач. Надеюсь и увидеть взломы по ним.

Спасибо,
MikeMirzayanov

UPD: Соревнование завершено. Спасибо всем, кто помог протестировать платформу. Всё работает отлично, мы готовы к Good Bye 2016!

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

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

I would help with the testing but the time is so early for me :(

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

Since there will be an interactive problem in the Good Bye contest, will the testing round also have an interactive one?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +36 Проголосовать: не нравится

Anyone else is desiring to change nickname like me? :)

nice presents(cf round) for saying Goodybye 2016

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

How many problems?

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

When we can change Nickname?

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +47 Проголосовать: не нравится

This reminds me the great Education Codeforces Round by Edvard .

Ahh missing those Educational Codeforces Round .Sir do you have any plan to restart this Round?

Happy Hacking for All.

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

I have a lot of games did not attend, in The hope that The contest Goodbye2017 would it be possible for me to rise!

»
10 лет назад, скрыть # |
 
Проголосовать: нравится -66 Проголосовать: не нравится

** ** *****? :P

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

Число 13 меня изрядно напрягает...

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

How to solve C task? I couldn't invent something with smaller than 15 queries :(

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

no hacks !! lets enjoy system testing now

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

I had one solution in 8 queries but none in 7 queries :(

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

someone got Runtime error on test 367 in Problem C

LOL XD

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

someone got Runtime error on test 367 in Problem C

LOL XD

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

    It's quite easy to get a Runtime error if you forget about the fact that the program must terminate after it makes a correct guess. It's unlikely to happen on a random test case (as the test which such a solution fails depends on the way the queries are generated, and there are very few such tests for any reasonable way of generation), but it's likely to happen on at least one test case of a few hundreds.

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

    It's me. :(

    The RE is from that if I can't guess out the hidden string, it will trigger an assertion fail.

    But, after changing random first guess to fixed first guess, it got AC now. However, I'm still not sure why random first guess will fail to guess the hidden string in 7 queries.

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +53 Проголосовать: не нравится

Now that's what I call exhaustive testing.

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

Hello,

Why did http://codeforces.me/contest/753/submission/23394205 pass, given that it does not terminate after it makes a correct guess?

:D

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

Sorry, possible I am not enough good at Interactive problems and maybe I didn't read careful Interactive guide, but I have question :D

I spent a lot of time to find mistake at my program and it was printf without "\n" (new line). Is somewhere written that we need to use "\n" ?

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +134 Проголосовать: не нравится

real programmers always defeat cheaters

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

What is the logic behind Problem A? I tried it by finding a number 'd' such that given number 'n' lies between 1+2+....d and 1+2+...(d+1). But i was unable to do any further. Any help of explaining the approach would be helpful. Also, i have went through some of the accepted solutions and they did some "add n to the last element". Why?

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

    The number of kids to which we will give n candies is k + 1. We will give 1 + 2 + ... + k candies to the first k kids and remaining n - 1 - 2 - ... - k candies to the last (k + 1)'th kid.
    1. This sum is strictly less than n. That is 1 + 2 + ... + k = k·(k + 1) / 2 < n.
    2. The remaining amount of candies is strictly larger than k. That is r = n - k·(k + 1) / 2 > k.

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

      Could you shed some more light on second inference. I am having trouble in finding why this method should work OR more clearly, intuition with which you came to such solution. Thanks a lot.

      • »
        »
        »
        »
        10 лет назад, скрыть # ^ |
        ← Rev. 4  
        Проголосовать: нравится -7 Проголосовать: не нравится

        I've gained intuition after solving this problem.

        For now you could try looking into examples:
        10 = 1 + 2 + 3 + 4
        11 = 1 + 2 + 3 + 5
        12 = 1 + 2 + 3 + 6
        13 = 1 + 2 + 3 + 7
        15 = 1 + 2 + 3 + 8

        In the last case n = 15, we can try to improve our distribution by splitting 8 into two parts.
        Here are all the possible partitions of 8 into two parts:
        8 = 1 + 7
        8 = 2 + 6
        8 = 3 + 5
        8 = 4 + 4
        We know that the next number we can use has to be at least 4, because we have used numbers {1, 2, 3} already. This automatically discards 3 out of 4 partitions: {(1, 7), (2, 6), (3, 5)}, because these partitions contain forbidden numbers 1, 2 and 3. The only partition that is not discarded because of the already used numbers is the following: 8 = 4 + 4. But we cannot use the number more than once in our distribution, so the following partition is invalid: 15 = 1 + 2 + 3 + 4 + 4.

        But we can improve k from 4 to 5 if we are given n = 16:
        16 = 1 + 2 + 3 + 4 + 9 = 1 + 2 + 3 + (4 + 5).

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

    Let d be the minimal number such that 1 + 2 + ... + d > n. Denote this sum 1 + 2 + ... + d as s.

    We are almost finished, just output all numbers from 1 to d, except s — n.

    E.g. if n = 13, it's 1 + 2 + 3 + 4 + 5, s = 15, output 1, 3, 4, 5 and don't output 15 — 13 = 2.

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

:D

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

I'm a bit curious of how the run time is determined for the interactive problem, e.g. is running time of the testing machine (that we interactive with) is counted?

I submitted the same solution for C 3 times and got 3 different results:

  1. TLE test 25

  2. TLE test 259

  3. AC

The problem is the 3rd submission run in ~300 ms less than the 2nd submission at test 259 (they are run with same source code, and same input)

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

editorial?

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

In the Hard version of Bulls & Cows, were all the test cases static numbers to guess? Or we need to guess the number from a smarter adversary. I think the latter is more challenging.

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

    arent both same,since testcaes consisted of all possible strings

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

      No, since an smart adversary doesn't need to pick the hidden number from the beginning. He only needs to keep their answer consistent, it means, at least one valid answer must exist, but he can guide you through a path of outcomes that force you to do more than 7 question, analyzing your guesses.

      It can be guaranteed as you say, if all possible numbers are asked and the solution is deterministic, otherwise I'm not so sure. Btw, I don't think all possible numbers are asked, but only ~400.

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

        But if all possible strings are included, a 'killer adversary' won't make a difference (your guess will still be the same), unless your algorithm included something random (well, it's not the fault of adversary :p)