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

Автор .o., 9 лет назад, перевод, По-русски

Привет, Codeforces!

Добро пожаловать на последний раунд Codeforces в 2014 году, Good Bye 2014! Этот раунд очень необычный; Во-первых, раунд начинается 30 декабря в 18:00 по Москве. Во-вторых, раунд длится 2.5 часа. И в третьих, раунд будет общим для двух дивизионов, что означает, что Div1- и Div2-участники не будут разделены.

Задачи подготовлены мной (.o.) и Seunghyun Jo (ainta). Это наш второй раунд на Codeforces. После нашего первого раунда случился чёрный день Codeforces, и мы надеемся, что в этот раз ничего подобного не произойдёт :D

Спасибо Won-seok Yoo(ainu7), который тестировал раунд и обусждал с нами набор задач.

Также мы хотим поблагодарить некоторых людей, без которых этот раунд не состоялся бы. Максим Ахмедов (Zlobober) сильно помог нам в подготовке задач. Мария Белова (Delinur) перевела условия задач на русский язык. Михаил Мирзаянов (MikeMirzayanov) создал прекрасные сайт Codeforces и систему Polygon. Они также заслуживают аплодисменты!

Разбалловка будет оглашена перед началом раунда, как обычно.

Мы желаем вам всем удачи. С новым годом!

Просьба оставлять комментарии на английском языке, если вы хотите, чтобы авторы смогли их прочитать.

UPD (2014-12-30 17:34:48) Разбалловка будет выглядеть следующим образом: 500-1000-1000-1500-2750-2750-3500.

UPD (2014-12-31 12:49:05) Sorry for updating in English. Round has finished, congratulations to the winners!

  1. tourist
  2. Petr
  3. rng_58
  4. HYPERHYPERHYPERCUBELOVER
  5. subscriber
  6. Merkurev
  7. al13n
  8. mmaxio
  9. mexmans
  10. GlebsHP

Also, thanks to Marcin_smu, who solved problem G after the contest for the first time.

UPD(2014-12-31 12:51:08) Sorry for updating in English. Editorial is published. Currently, only A-F is available, but I will add G as soon as possible. Sorry for the late editorial.

UPD(2015-01-02 21:30:44) I wrote the editorial of G. Sorry for the late update..

Анонс Good Bye 2014
  • Проголосовать: нравится
  • +758
  • Проголосовать: не нравится

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

Why I give -88 for this comment "Happy New Year !"?

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

Hi,Happy New Year!

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

hello Happy New Year

dis like me pls

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

"создал прекрасные сайт"

На русский Google Translate помог перевести?

UPD Понял свой баг.

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

    Вообще-то тут нету ошибки, слово "прекрасные" относится как к "сайт Codeforces", так и к "систему Polygon"

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

      просто Google Translate лучше шарит в русском =)

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

It is rated? Happy New Year!

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

Уходящий год был непростым (2014 = 2*19*53). Непростыми будут и следующие два года, а вот 2017 снова будет простым. :)

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

does division combined that means div1 contestant can perform hacks on div2 contestants ??

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

    Yes. And div2 contestants can perform hacks on div1 contestants too)

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

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

        As far as I know, being in Div1 doesn't necessarily mean you hack better than others. See the nice summary of hacks and see how there are blues and purples mixed with oranges and reds.

        ...we need a special contest based solely on hacking.

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

          That's presumably because division 1 participants can only hack other division 1 participants, and vice versa. Most of the low division 1 crew (people like me who only get A) got to division 1 in the first place by cleaning up "easy" hacks (things like overflow, bound checking, etc.). If every contest were division-combined, I'd guess that the best hackers would be oranges with a couple of blues/low purples thrown in (i.e. those who will finish the problems they can do fairly quickly and have the ability to hack others accurately).

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

            thats exactly what im counting on after reading all problems and solving what i can solve. its just most contestant strategy is to solve the first three problems and start looking for hacks so i have to be fast. I hope for alot of green color in hacks and submissions but not in rank color :D

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

            Ah, true, Div1 contestants can only hack Div1 contestants. I forgot that difference.

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

              What if they put Div1 and Div2 contestants in separate rooms, like they do for Div2-only contests?

              I have no idea, haven't seen a contest for both divisions before.

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

          Its a positive feedback loop; remember your ecology folks!

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

Is it going to be rated?

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

Could you please tell me how many problems in this contest?

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

    There are 7 problems. I forgot to add that in the announcement. I'm sorry for that.

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

I wish score distribution will not be dynamic :)

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

I'm expected to take this contest!

But I'm little nervous I'll not perform well because it haven't programmed for half a year.

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

Good Bye 2014 — Good Bye div_2 Hello 2015 — Hello div_1 Good luck to all members of div_2 Happy new year!!!

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

Is there a handle changing gift from Codeforces like last two years? :)

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

Hope for high rating .

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

Last year in "Good Bye 2013", We get "Happy New Year!" instead of "Accepted". what about today?

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

Will we be able to change our handles this year? :)

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

wow this is...

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

At least 50% of comments are "hidden because of too negative feedback" :)) Dislike me plz ;;)

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

Happy Everyone! I think the Good Bye 2014 contest will be a interesting and funny contest. Tonight will be a while night.

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

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

Most comments are Hidden.I do not like it. Because Everyone cannot read that comments? So everyone try to Like that comment. At least no click buttom down vote::i do not like it. we see in facebook ..there is no unlike or i do not like it.

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

I'm very happy to hold this special round. Good luck for everyone!

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

Damn! I have a final exam tomorrow :( but I so wanna participate in this round.... :/

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

Will there be any souvenirs? We want T-shirts!

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

YuukaKazami has registered for this contest :D http://codeforces.com/blog/entry/14798

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░██████░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░█████████░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░████████░███░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░█████████░░███░░░░░░░░░░░░░░ ░░░░░░░░░░░░░███████████░░░██░░░░░░░░░░░░░ ░░░░░░░░░░░░██████████░░░░░░██░░░░░░░░░░░░ ░░░░░░░░░░██████████░░░░░░░░░██░░░░░░░░░░░ ░░░░░░░░░░█████████░░░░░░░░░░░██░░░░░░░░░░ ░░░░░░░░░█████░░░░░░░░░░░░░░░░░██░░░░░░░░░ ░░░░░░░░████████░░░░░░░░░█████░██░░░░░░░░░ ░░░░░░░░░░░███████████████████░░░░░░░░░░░░ ░░░░░░░░░░░████████████████████░░░░░░░░░░░ ░░░░░░░░░░██████████████████████░░░░░░░░░░ ░░░░░░░░░████████████████████░░██░░░░░░░░░ ░░░░░░░░████████████████████░░░░██░░░░░░░░ ░░░░░░░████████████████░░░░░░░░░░██░░░░░░░ ░░░░░░████████████░░░░░░░░░░░░░░░░██░░░░░░ ░░░░░████░░██░░░░░░░░░░░░░░░░░░░░░░██░░░░░ ░░░░███████░░░░░░█████░░░░░░█████████░░░░░ ░░░░██░░████████████████████████░░░░░░░░░░ ░░░░░░░█████████████████████░░░██░░░░░░░░░ ░░░░░░███████████████████░████░░░██░░░░░░░ ░░░░██████████████████████░░░░░░░░░██░░░░░ ░░██████████████████████░░░░░░░░░░░░███░░░ ░███████████████░█░░░░░░░░░░░░░░░░░░░░██░░ █████████░█░░░░░░░░░░░░░░░░░░░░░░░███████░ ░░░░░░░███░░░░░░░███████░░░░░░██████░░░░░░ ░░░░░░░░███████████████████████████░░░░░░░ ░░░░░░███████████████████████████░██░░░░░░ ░░░░██████████████████████████████░███░░░░ ░░░█████████████████████████████░░░░░██░░░ ░░█████████████████████████░░░░░░░░░░░██░░ ░█████████████████████░█░░░░░░░░░░░░░░░██░ █████████████████░█░░░░░░░░░░░░░░░░░░░████ ░░░░░███████████░░░░░░░░███░░░░████████░░░ ░░░░░░░░░░░░░░░░███░█████░█████░░░░░░░░░░░ ░░░░░░░░░░░░░░░░████████░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░██████░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░██████░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░█████░░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░████░░░█░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░████████░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░███████░░████████░░██░░███████░░░░░░ ░░░░░░░░░░░██░░██░░░░██░░██░░██░░░░░░░░░░░ ░░░░░░░░░░░██░░██░░░░██░░██░░██░░░░░░░░░░░ ░░░░░░███████░░██░░░░██░░██░░███████░░░░░░ ░░░░░░██░░░░░░░██░░░░██░░██░░░░░░░██░░░░░░ ░░░░░░██░░░░░░░██░░░░██░░██░░░░░░░██░░░░░░ ░░░░░░███████░░████████░░██░░███████░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ HAPPY NEW YEAR EVERYBODY !!!

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

Hmmmm I'm wondering why this contest isn't held tomorrow......

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

What are you guys hoping the problem names are?

A. New Year and Implementation

B. New Year and Sorts

C. New Year and Easy DFS

D. New Year and Maths

E. New Year and More Maths

F. New Year and Impossible Problem

G. New Year and An (Not) Easy Problem About Trees

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

In order to prepare exams, I haven't written code for a long time.

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

Note that this is also contest number 500 (id from the URL). Lots of anniversaries :)

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

number of participants is more than 6000 now. I hope that nothing happen to codeforces servers in this round :D

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

More than 6000 users are registrated for the contest! I think it will be the record.

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

wow! so many participants! i think it's the first time we have ever reached 6000

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

"Thanks to Xellos for giving us some ideas." Why do I have the feeling the contestants won't like those ideas?

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

GOODBYE 2014!! hope 2015 a better year

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

wish a HaPpY NeW YeAr with good rating for all =D

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

Difference between the starting time of the contest and end of registration now decreased to 2 minutes :) (earlier it was 35 minutes)

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

6250 registrants! What a record! And registration ends before contest starts only 2 minutes.

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

Anyone noticed it's the 500th contest?

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

Can't submit :( Like I am not registered, though actually I am.

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

Hi, I just realized that the contest started 15 minutes ago. I didnt know that the registration closes 5 mins back as this is my first live contest. Is it possible to enter now? I have already completed problem 1 locally.

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

Good Bye 2014 and Div. 1 )))

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

A lot of submissions are in queue

you have to add some time ...

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

Goodbye div1 :( was fun while it lasted

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

My last submission was 5minutes before the end of the contest — after end of the contest I still didn't get the verdict :( .

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

At problem D: "It is guaranteed that wj is smaller than the current length of the rj-th road.". why?

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

Как делать последнюю когда один вниз идет, а другой вверх? А то я час писал её, а потом понял, что не умею с этим случаем разбираться.

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

В Е решение — отсортировать запросы и дерево отрезков? Или я ошибаюсь? У меня был час =_=

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

    Сортируем запросы по убыванию правого конца, храним актуальные палочки в стеке, ответ на запрос -- разность между координатой конца и начала минус сумма высот актуальных палочек. Можно даже фенвиком сумму считать.

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

    Можно делать онлайн двоичный подъем по количеству удлиненных палочек.

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

how to solve E .

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

    Offline — just sweeplining in a smart way, one BIT helps calculate the answers.

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

      I normalized each domino — max(l[i], l[i-1]-(p[i]-p[i-1])) and use sum on segment tree <a, b-1> but it gets WA on test #7. What did I do wrong?

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

      It's also possible online.

      Let F[i] be the solution for query (i, n). First of all you compute all F[i]s and store them in minimum segment tree. It can be done in time, if you do it cleverly, going from right to left.

      Let M(a, b) be minimum of all F[i]s for . Answer for query (x, y) is F[x] - M(x, y).

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

        In fact F[] can be done in O(n) with a stack. And M(x, y) can be done by union-find sets. 9316327

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

        I don't understand why the answer is F[x]-M(x,y). Can anyone please explain?

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

          Executing plan (x, n) costs F[x] and it makes all dominoes between x and n (inclusive) fall, so it also makes y fall. Therefore, one way of executing (x, y) is to execute (x, n). However, this might be an overkill, as you may pay for dominoes that are behind y. So you need to subtract M(x, y).

          The reason why we subtract M(x, y) and not just F[y] is that there might be some domino close to y (from left side) that is much longer than y and therefore has better range than y.

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

            Thanks. I get it now.

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

            I don't think I understand your solution Baklazan. How does subtracting the minimum ensure the lowest possible value?

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

              Assume we can execute plan (x, y) for cheaper than F[x] - M(x, y). Then we can do the following:

              1. We extend some dominoes in such way, that if we push domino x after extending, domino y will eventually fall. We will do this for as cheap as possible, so it will cost less than F[x] - M(x, y). We will denote price of this step C.

              2. We find such , that F[z] is as small as possible (so F[z] = M(x, y)).

              3. We extend some dominoes in such way, that if we push z after extending, n will eventually fall. We will do it for as cheap as possible, so it will cost F[z] = M(x, y).

              4. Now we can push domino x. We are guaranteed that y will eventually fall by step 1. That means that all dominoes in range [x, y] will fall, so z will also fall. Step 3. guarantees that n will fall as well.

              Therefore we have effectively solved query (x, n) for C + M(x, y) < F[x], what contradicts the definition of F. Thus our assumption must be wrong.

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

    E can be reduced to heavy path decomposition. For each domino you should find which is the last domino that falls down if you push the current domino. Now the answers can be converted into edges in a tree (or eventually, multiple trees). You need to process some other information also, but the cost of each plan is the cost of the path between x and y in the corresponding tree.

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

I finished solution to problem F 3 minutes earlier than contest end, but failed to submit it due to network reason....... so sad to say goodbye to 2014 TAT

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

WTF with B?

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

Can't submit in the last 2 minutes :( I can't access Codeforces page quite frequently during the contest.

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

Ну почему не сделать так, чтобы при взломе перенос строки в конце добавлялся автоматически?! В полигоне же это сделано. Неприятно, когда в конце контеста из-за этого не проходят взломы, и при этом система жутко тормозит, так что это даже невозможно исправить.

Возможно, это повод реализовать фичу типа "очереди на взлом": когда взлом решения стоит в очереди, это же решение можно взламывать, но очки получает первый взломавший. Хотя на обычных раундах проблем с проверкой взломов вроде не было, но в этот раз в конце они тестировались около 5 минут.

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

    Разве в полигоне это сделано? Вывод генератора тестов берётся как есть и потом проверяется валидатором. Логично, что для генератора тестов на CF делается то же самое.

    EDIT: Понял, это про ввод теста вручную.

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

well done codeforces team :) ... today contest ran smoothly (the server didn't crashed) even in the record high participation.

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

    I frequently can't access Codeforces and missed the opportunity to submit in the last 2 minutes of the contest.

    I would not accept this contest if my rating drops to yellow because of this issue ><

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

question B was just made for hack Lol floyd warshall

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

What was the hacking case in B?

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

    3
    3 1 2
    001
    001
    110

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

    I think a lot of solutions that just swapped stuff in strange ways would fail on

    3
    3 1 2
    011
    100
    100
    

    The optimal series of swaps (elements, not positions) is (3,2) (1,2), not (3,1), although the latter gives a better intermediate result.

    (inb4 ninja'd)

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

      Thanks for the explanation guys. Will take this learning into 2015 — never underestimate Div2 1000 and greedy doesn't always work for apparently "easy" problems.

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

      I was testing some of the first in the standings solutions and was wondering shouldn't this

      7
      7 3 4 6 8 1 2
      0010000
      0001000
      0000100
      0000000
      0000001
      1000000
      0000000
      

      have as correct output 1 3 2 6 4 7 8?

      The output I saw was 2 3 4 6 7 1 8 but the 1 could be swapped with the first number. Am I wrong ?

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

    I used

    3
    3 1 2
    011
    100
    100
    

    to hack several people who just swapped every time it would give a better result (e.g. i<j and p[i]>p[j]).

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

    7 1 3 7 4 5 6 2

    0000000

    0010001

    0100000

    0000000

    0000000

    0000000

    0100000

    wrong output: 1 2 7 4 5 6 3

    answer: 1 2 3 4 5 6 7

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

      can you help me where i got wrong . what i did was take two arrays . sort one of them .then for each A[i]!=Bi and B[i]<A[i] check if they can be swapped . if they can be .do it .else continue;

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

        Your idea is wrong; it is not always optimal to swap when possible. See the above cases.

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

          lesson learned I thought i can move out of div2 today but looks like i have to spend some more time here :)

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

    4 2 1 3 4 0001 0001 0000 1100

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

после прошлого раунда упал кф, после этого упадет мой рейтинг))

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

My soln to B got hacked, submitted 5 mins before end of contest and then got verdict after contest :/

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

Good Bye 2014. Hello 2015 World!

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

How I can solve problem B?

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

    You have a graph with nodes numbered 1 to n. Each node has a value.

    All you have to do is, within each connected component, sort the values.

    After that is done for all the components, just print the values in nodes 1 to n :)

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

Website crashed as I was clicking submit button in the last minute, didn't come back up until the contest was over. My solution will most likely fail but I think Codeforces stability is a serious issue. Often during the competition I couldn't access the website for a minute or so, and it would crash from time to time.

On the bright side, the queue was doing impressively fine with 5000 users solving.

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

    But this is the case in every contest I participated in last few weeks. Typically it's not problem for me, because I'm not submitting in last few minutes, but even without submitting I'm getting "too busy" message quite often...

    I think this should be solved with high priority.

    Is someone recording the contests (something like Petr's screencasts)? That could be good evidence...

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

Thank you for nice problems! And there were weak pretests at A and B so hackers enjoyed this round.

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

good buy 2014 == hello 2015 == hello newbie

dis like me pls

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

    I suppose yes, because standard yes/no checker in polygon is case insensitive.

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

    Yes, outputs for YES/NO problems are generally case insensitive. (I knew this because I looked at Polygon, randomly browsing to its default checkers, and saw that there is a checker for "YES/NO problems, case insensitive".)

    ninja'd

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

Что такого в седьмом тесте задачи Е? Перевести ответ в рубли? Некоторые палочки замешаны в бетон и не падают?

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

In case I get a good place:

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

How to solve problem D?

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

how to solve D???and what concepts to know for it??

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

    calculate number of times an edge will be used in all the permutation. which will be equal to x+1*(n-(x+1))*(n-2) x=no of child of a node of the edge and divide it by nC3 and reflect the changes after each query

    UPD Its correct.

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

      You could also use the fact that E[X+Y] = E[X] + E[Y], coming to the fact that you only need to calculate \sum d(i,j), and calculating in a similar same way

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

    The easiest way is to notice that expected value they ask for, is just: Sum of distances between all pairs of vertices(i,j), multiplied by 3 (because there are 3 Santas) and divided by n(n-1)/2 (number of pairs of vertices)

    The only non-trivial part of the above quantity is sum of distances. It can be rewritten as: Sum of (for every edge e) cost[e]*frequency[e], where frequency[e] is number of paths in the tree that pass through that edge. Notice that if we know frequency[e] for every edge, we can easily answer every query in constant time by subtracting (change of cost of edge)*frequency[e]

    So, the only thing left is to calculate the frequencies for every edge — and they are static (do not change in time). How to do it? The way I approached this problem is by making DFS from vertex 0, that returns number of vertices in the subtree below. Then you can notice that for every edge (u,v) the numebr of paths that pass through it is: (number of vertices in the subtree) * (N-number of vertices in subtree).

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

      Great explanation! Thank you.

      For the first part, why is it that we can just multiply the sums of all distances by 3? Doesn't this mean we will count the same edge 3 times? As in, we might be choosing the same edge 3 times and associating it with a triple, whereas the only "valid" triples are those that have 3 distinct edges.

      If this doesn't make sense, I can try and clarify.

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

        Good to see somebody enjoying my explanation :) (below, I will use E(X) to denote expected value of X)

        We need to calculate

        E( d(i,j) + d(j,k) + d(i,k) ),

        where expected values are taken over every triple of distinct numbers i,j,k. Thanks to linearity of expected value (http://en.wikipedia.org/wiki/Expected_value#Linearity), we can rewrite this as:

        E(d(i,j)) + E(d(j,k)) + E(d(i,k))

        Since every of those three terms is independent of the remaining two, we can just calculate first one — the other two will be the same. Thus, what we need is actually equal to:

        E(d(i,j)) * 3

        with expected value (still) taken over every triple of distinct numbers i,j,k. But since k is absent in this equation, we may as well drop it, leaving taking average only over all PAIRS of distinct numbers i,j. Which is what I wrote above. I hope that is more clear now.

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

I submitted an answer for "D" (forgot to remove my extra cout's) but due to the huge queue, I got the judgement at the end of the contest. WA on pretest 1 on the correct logic. :'( . A bit harsh on late submitters?

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

Is the System test cases are weak in problem A? How this solution passed the system tests as it has no return word before solve function in solve function?

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

    I think the last thing that was returned remains on the stack.

    That template, omg :)

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

      I think the explanation of andreyv is more acceptable. Though he did a silly mistake but he is a great coder in real life. He is an ACM ICPC regional contestant. How strong is his precode! OMG!

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

    This solution invokes undefined behavior. Undefined behavior means that anything can happen, and in this case "anything" was to "work correctly". So, this solution just got lucky.

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

      But the solution is not perfect. As far I think, It needs just more test cases to behave "incorrectly".

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

        No, not in this case. It probably returns the value in a register(I have not read the assembly code generated for this program, but it is usually the reason why such programs work). So it always works properly on a particular machine(even though it has undefined behavior). Adding more tests cannot help here.

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

          Yeah! I think you are right! He is really lucky one! Really amazing!! :)

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

    I learned this type of coding form my Guruji sir Ananta Jalil (http://en.wikipedia.org/wiki/Ananta_Jalil). he can make impossible possible. just joking it was a silly mistake. :P

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

So many failed system test for problem B on test 15 :O

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

Has someone some smart insight why we can ignore book weights in problem C? I solved it, but I did a lot of testing before submitting, because I cannot see clearly why that works...

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

    Well, after reading any book, for the next operations, the original position is irrelevant, because it is now on top of the stack. To ensure the minimum answer, put a book B under any book A read before it, because otherwise you lift book B an extra time, and when you get to reading book B, A is on top anyway. This is my reasoning (might seem unclear), and it doesn't use the book weights except finding the actual answer.

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

    Because after a book is first used (the weight lifted at that time is independent of the book's weight), the number of times it'll be lifted is uniquely given (since the order of books above it at any time is uniquely given by the sequence of readings).

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

      I more question related to our answer

      the weight lifted at that time is independent of the book's weight

      Even if we count weight of the book, it is same problem, or not?

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

    No matter what happens, when we want to read book X, we are required to lift all books appearing between X in the reading order and max(beginning, last occurrence of X). If we place the books from top to bottom in order of their first appearances in the reading order, that it's easy to see that we'll be lifting only required books. Hence, we cannot do any better.

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

    The easiest way for me to see this was to look at a single pair of books i and j.

    If we only look at these two books, we will only contribute to our total cost whenever we "switch" which book is on top (i.e. if book i was on top, and book j is chosen to be read or vice versa).

    Now, clearly, the optimal ordering is one where the first book chosen is put on top first.

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

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

Any idea what is the 22nd testcase on D?

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

    While any individual member of sum (using your variable names) is up to 10^18, the whole sum is up to 10^23, so it's insufficient to store that in long long. I used long double for summation only (individual members were calculated as long long) and it passed.

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

      The answer at any point of time is

      where xi and yi is the number of vertices on both sides of edge i. You can shorten both sides by n - 2. After that both numerator and denominator can be stored in a 64-bit integer. So the only floating point operation needed is the final division.

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

1.5 hrs system test.

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

No submissions for problem G?? so hard or wrong??

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

It was the most wonderful contest in this year!!!

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

Petr will be the third target :)

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

What was testcase 15 in problem B testing? Or: what was the common mistake of those solutions that failed systest 15?

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

    I think it were test cases already discussed in this question... Or your code is working for those test cases ?

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

      My code is okay, but I'm wondering about multiple solutions in my room that I didn't hack.

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

    I hacked 6 solutions during the contest that just did the swaps greedily (if i<j, a[j] < a[i] and ok[i][j], swap). I guess test 15 is the first to fail that. There are lots of easier tests to fail that, of course (read above for lots of examples).

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

Is this rating contest?

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

http://codeforces.com/contest/500/submission/9317990 what is wrong with this problem B code

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

    This is the easiest I found your code is not working for

    5
    2 4 1 3 5
    00101
    00010
    10011
    01100
    10100
    

    Correct answer is 1 2 3 4 5 your code returns 1 3 2 4 5

    edit: wrong submission, let me check later

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

I went from blue to orange directly! WOW!!

:D :D :D :D :D

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

Nothing better than starting 2015 with 2015 rating xD

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

4 поинта до красного. Обидно немного, хоть и не рассчитывал на красный цвет.

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

Petr > 3000 !!!

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

crossed 1800 mark for the first time :) ... new rating 1854

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

736-th place, +177 rating, how is it possible? I can't understand.

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

    Because most of the top rated people participated, I think. I got 505th and got +366!

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

    The inflation problem for combined division contests is even more serious than usual.

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

    Here is my idea:

    With division 2 contestants participating, it is easier for blue, purple, yellow and red to get a high ranking in percentile.

    With many top players participating, the average rating is raised.

    That's why division combined contests are mostly rating boosts.

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

      Main problem behind such assumptions is that we actually don't know how rating works :D I've heard that formulas are made in such a way that sum of ratings after round does not increase; and there are also some "magic constants" to prevent inflation, so sum of ratings after round should even decrease.

      I guess we should take a look at performance of these users who had their first rated event today — if their average rating is below 1500 now, then they may be one of the reasons of inflation; maybe some of them will not compete anymore, some other will just violate rules and create another account after bad performance today, and it's a boost for our rating.

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

    I've already told MikeMirzayanov about problem with fast rating inflation few weeks ago, and i guess that after this round he'll agree that some changes in rating formulas are needed :)

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

red-colored before 2015! (although i feel like failed in this contest)

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

My first submission to D failed pretests because I tried to output a long double with printf("%Lf") (it does work on my computer, but not in MinGW due to a bug), is it possible to have it accepted? (it is not my bug)

Also, I do not understand this portal, is there any way to see all the recent posts? (I can only see all the recent comments in "Recent actions")

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

    For what it's worth, you don't get penalty when your solution fails pretest 1.

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

      Yes, I know. But I got less points than I would get if it was judged as accepted (I was unable to find any bug, so I have solved E and returned to D later).

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

Hello. Would you please explain me why in here:(http://codeforces.com/contest/500/submission/9326013) output isn't in double? I casted everything to double and I don't still know why this happens.

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

    You should use std::setprecision or printf rather than std::cout when there is constraint about absolute or relative error.

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

    Default "cout" of double always prints 6 significant digits. setprecision or printf is definitely required.

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

It was a pleasure to compete together with div 1's coders. Happy new year!

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

Под Новый год мечты сбываются! Ура!

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

Finished coding problem D just 1 minute after contest (wait long time until practice mode open, and submit it and got AC). Why I'm so slow to implement something, I lose my rating this time :(

Btw, happy new year.

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

Quite strange behavior of the testing system.

During systests this submission gets TL15: 9311938. The same code in upsolving gets RE15: 9326201. And in my local Unix system this buggy code runs correctly.

Small fix makes this solution Accepted: 9326316

Is there any explanation?

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

    9326834 AC using MS Compiler.

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

    The heap buffer overflow your code caused truly may lead to anything (even possibly arbitrary code execution?), including infinite-loop.

    It may also be a little bit random due to "what is next to your buffer" on different runs, so the behaviour is not strange (though getting such TLEs is rare — Congratulations! achievement unlocked :D)

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

My 8th raising up contest in a row! :D

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

For some reason using long double instead of double gives extremely weird output for me but works on CF. Output in my PC for first case is:

-26815615859885194000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000.0000000000 -2.0000000000 -0.0000000000 -2.0000000000 -0.0000000000

AC code: http://codeforces.com/contest/500/submission/9326579

Any idea what the problem is?

Edit: Actually following line gives -2 as output:

cout << (long double) 3;

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

Happy new year. I am red coder, good surprise ^-^.

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

Я продолжил прошлогоднюю традицию менять цвет после написания Goodbye. Yellow color is a good New Year's present :)

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

Nice round. One question about rating calculation: is the weight given to a new contest > 50%? The rating changes seem fairly drastic in some cases.

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

Made a small mistake in problem D (using long long to calculate the sum) and ranked only 185...But very surprised when my rating changed...2138+=92... Good Bye 2014 and Happy New Year!

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

Имхо в контестах для двух дивизионов, таких как этот, рейтинг пересчитывается с слишком большой амплитудой. Было бы правильней добавлять 0.6 — 0.7 от того, что добавилось при текущих формулах.

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

    Причем похоже это не работает для топов. tourist, Petr и rng_58 заняли три первых места (как они и должны были в соответствии с их рейтингами), при этом их прирост рейтинга был раза в 2-3 меньше, чем их же прирост с аналогичными результатами за прошлые раздельные контесты.

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

So happy to end this year with my highest rating. I would say that Problem E is beautiful even though I made many stupid bugs. There are many solutions with different approaches.

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

WoooW I am a Master.Thanks for a great round !

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

Thank you really really thank you you've made my day :) XDD i cant be any happier

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

Why there isn't a Hello 2015 Round?? It will be nice

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

I'm very disappointed about my result :( Hope the next contest will be orgranized soon!

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

I gained +304 points!! Is there anyone gained more points than me?

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

giant rating_increase (dreamoon_love_AA) :P

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

YouAllHaveMeizi Master in the first contest

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

В этом году мне больше понравилось :)
Round______________raiting_before______place______delta
Goodbye 2013_______1578_____________1207_______-25
Goodbye 2014_______1584_____________913________+237

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

    Есть такое:
    Round______________raiting_before______place______delta
    Goodbye 2013_______1483_____________1454_______-21
    Goodbye 2014_______1765_____________482________+226

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

Rating is broken.

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

There is something very strange behind rating formulas. While we clearly see overall rating inflation (number of red coders increased by ~10% after a single contest...), top participants got very small rating improvement today. rng_58 have +4 and Petr have +6 today; tourist have +14 only, while he had +37 in Round #282 — and today he beat both #2 and #3 of world ranking, while both of them were missing round 282.

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

    It may be that the formulas to avoid rating inflation affect very high rated coders much more than they affect the rest.

    As you said, problem with such speculation is that we don't actually know how rating works. But we do know this update was completely broken.

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

      It may be that the formulas to avoid rating inflation affect very high rated coders much more than they affect the rest.

      Isn't it how it should be?

      When more new people are registered in codeforces, there should be more red coders. If one can beat a half of red coders participating, he/she should become red too rather quickly. It would also be strange to make one yellow just because new people came. Imo, some percantage of colors needs to be maintained.

      On the other hand, it should not be that difficult to get to the top. I guess one will need to win 30-40 rounds in a row now to claim the first place(assuming tourist does not participate or takes the second place in all the rounds) in the rating, and this is probably a mistake. That is, the rating of the tops should grow slower, or else they will become unreachable if they participate often (at least, until they are alive:).

      We should probably pay less attention to the numbers being added to rating, and to look more at how consistent the percentage of the colors is. My guess is that it is reasonably consistent. The problem is that there are many people who are registering new accounts and do not participate later. Those people should probably be excluded from the rankings after some time, like it is done in topcoder, or even by resetting their rating, so that there will be no people who accidentally became red due to wrong formulas and do not participate any more. And the formulas should be revised to support the consistency within the 'active group'.

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

        I don't see why inflating top ratings is inherently a bad thing if it reflects how much better they are from the rest of us mortals. If someone is beating tourist consistently, the rating system should ensure that that person catches up to him quickly. This can be done through volatility scores, for instance -- someone that is consistently performing outside of their predicted range should be allowed to have very large rating increases. The codeforces philosophy of making rating updates independent is misguided, in my opinion.

        But I'm not entirely opposed to having small increases for top players. The point was more how drastically different the rating changes are in regular div 1 rounds and on this round, which demonstrates the rating system has failed to show any sign of consistency. Or you agree it is reasonable for tourist to gain more rating from winning #282 rather than Good Bye 2014 (with a lot more participants, and in which he beat #2 and #3)?

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

    Why the rating formulas aren't public?? Is there a special reason??

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

Hm, when is the editorial ETA (estimated time of arrival)

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

This year it was "Accepted" instead of "Happy New Year"....

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

How could I print a long double with printf? I used %Lf and got WA, is %lf correct?

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

    %Lf is correct. The problem is with Windows's C runtime, which doesn't recognize 80-bit long doubles.

    The safest way is by far to convert to double first, then print using %f, and it's what I would recommend.

    If you really want printf to print long doubles and you're not using MS C++, the compiler has its own version that seems to work, called __mingw_printf. I don't guarantee that it's decently fast, correct or available though.

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

BTW, will there be tutorials of the problems?

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

I appreciate the efforts you put in to make this contest possible but without the editorials its all useless.

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

Editorials ... please.

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

There should always be a MAX pretest.

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

    Most of the bad submissions would either timeout, or give WA in such case, whichever the problem it has. What would be the use of hacks then? Moreover, max tests would overload the servers even more — and I think Codeforces are already having troubles serving so many people at once.

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

We are waiting for a perfect editorial for Good Bye 2014 yet.

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

Hello,

For B Question I first found the transitive closer of adjacency matrix then performed bubble sort greedily. Can anyone please tell me what is wrong in this? or any testcase which will give wrong result on this approach. My code is working fine for this Case also I am unable to see Testcase 15.

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

Good Bye 2014,New Year Permutation: The test case 15 does not satisfy the constraint of the problem A[i][j] = A[j][i], kindly correct this. (When I tried submitting my code that uses only the upper triangular matrix I got wrong answer on test case 15 however when I submitted the same code with the modification to use the entire matrix for dfs it got accepted)