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

Автор Gasser, история, 7 лет назад, По-английски

Hello everyone. As a person that extremely enjoys competitve programming, and thus enjoys Codeforces problems I really want to adress this issue.

Problem link: http://codeforces.com/contest/321/problem/C

My submission (Wrong code and get AC): http://codeforces.com/contest/321/submission/26788450

rng_58 submission (Right Code and get AC too): http://codeforces.com/contest/321/submission/3973635

Input:

60

1 2 1 3 3 4 3 5 5 6 5 7 7 8 7 9 9 10 9 11 11 12 11 13 13 14 13 15 15 16 15 17 17 18 17 19 19 20 19 21 21 22 21 23 23 24 23 25 25 26 25 27 27 28 27 29 29 30 29 31 31 32 31 33 33 34 33 35 35 36 35 37 37 38 37 39 39 40 39 41 41 42 41 43 43 44 43 45 45 46 45 47 47 48 47 49 49 50 49 51 51 52 51 53 53 54 53 55 55 56 55 57 57 58 57 59 59 60

OUTPUT: (rng_58) red coder it's the right output

E F D E E F C D E F D E E F B C E F D E C D E F D E E F A B E F D E E F C D E F D E E F B C E F D E E F C D E F D E E F

my OUTPUT:

Impossible!

This picture explain my test case:

http://imgur.com/a/l9WBH

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

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

cgy4ever can you fix it ?

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

    I knew that issue and the reference solution is still wrong (but it is correct for all current data).

    Unfortunately I don't think we can fix it: we may want to keep testdata same as it was during the contest. And in general we should not add testcase during or after a contest.

    If I'm wrong then I'm happy to add more testdata.

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

      MikeMirzayanov Can you help us ?

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

      it's important to correct it to make everyone sure about his answer. And if it can't be changed even by Mike himself, please edit the editorial and make a big warning for the weak test cases. it will be better if you add the test cases in any notepad and upload it.

      After I noticed that my old code is wrong, I wrote another one and it's also AC. So, I can't know if it's true AC or false. I know nothing about centroid of tree.

      if you are interested about it my submission is here : 26791285

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

Auto comment: topic has been updated by Gasser (previous revision, new revision, compare).

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

Also see this: http://codeforces.com/blog/entry/50804?#comment-347421

That was first time I solved problem D in contest but after I learned tests were not strong :D