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

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

Hello Codeforces!

I'm proud to announce that Codeforces Round #457 (Div. 2) will be held on 19 Jan, 14:35 UTC. The problemset is authored by southball, longhuenchan and me (STommydx). It is our first round in Codeforces and hope you all find the problems interesting.

We would like to thank the following people as the round would not be possible without their kind help: vintage_Vlad_Makeev for coordinating the round, Arpa for testing the problems and MikeMirzayanov for the great Polygon and Codeforces platform.

The contest will consist of 5 problems and you'll be given 2 hours to solve them. The scoring distribution will be announced close to the start of the round as tradition.

Let me close this blog post by answering the most frequently asked question in Codeforces. This round is rated for all Div. 2 participants. As usual, Div. 1 participants can join out of competition.

Good luck and high ratings!

UPD:

Scoring distribution: 500-1000-1500-2250-2500

UPD2:

We are extremely sorry for the situation for problem B. We are figuring out a correct solution for problem B. I hope you all enjoy the rest of the problems.

UPD3:

The round is over. Congratulates to the winners!

Div2:

  1. ustatt
  2. HanaElhami
  3. SorryBahadir
  4. ntv
  5. Om_nik

Div1+2:

  1. eddy1021
  2. chemthan
  3. nhho
  4. fmota
  5. ustatt

The editorial will be available tomorrow.

UPD4:

Editorial is ready!

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

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

Is it the first cf round whose problems are prepared by Hongkongers??

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

Why it doesn't appear in the main page? UBD : its Now :D

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

Finally the wait is over.

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

Good luck, high rating

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

I wish a high rating for all.

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

enough time limit for problems

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

"Good luck and high ratings!"
Usually after these words there is always something very bad happening.

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

Good luck!

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

thi cho vui chứ tạch VOI rồi :(

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

    Next time, please use English or Russian in public Codeforces blog posts.

    Anyway, there will always be a second chance. Keep fighting, as long as your heart is still on for competitive programming. ;)

    (P/s: For those who don't speak Vietnamese, he said he'd play for fun, as he thought he'd fail the Vietnamese Olympiad in Informatics, which occured recently.)

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

    VOI is not the end, ACM is waiting for you.

    .... And strong teamates

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

They mentioned unusual start time in the mail....What's the usual start time?

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

The problem B's standard solution has a error.

Input:1 7

Output should be -2 -2 -2 -3 -4 -5 -5 instead of -2 -3 -3 -3 -3 -3 -3.

http://codeforces.com/contest/916/hacks/399042

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

    It is the same with 19 5 The answer shoulf be 3 3 1 -1 -1 and it is 3 2 2 1 0

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

    That might be why I always Wrong Answer on pretest 5 For the standard is wrong.

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

    Wow, this is a SERIOUS problem. The round should be unrated.

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

    Wow, I'm right. I've got stuck in B for 30 mins.

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

    Would you please explain the idea behind this?

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

      I got the wrong solution but got passed using priority_queue, just like the standard solution

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

      because -2 -2 -2 -3 -4 -5 -5 is lexicographically greater than -2 -3 -3 -3 -3 -3 -3, and there is no way you can get an answer with the largest number smaller than -2.

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

        Why -1 -2 -3 -4 -5 -6 -6 is wrong?

        -1 -2 -3 -4 -5 -6 -6 > -2 -2 -2 -3 -4 -5 -5

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

          y, which is max(Ai) must be minimized. In your case, y=-1, while in second case y=-2. Your y is not the minimum.

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

            I think B is only a greedy problem, try to change the number to binary system, and for a pow(2,m) can split to 2 pow(2,m-1) until the limit reached

            Am I right? Can I show my code here?

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

    Why it should be -2 -2 -2 -3 -4 -5 -5 ?

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

      Is it because those are negative numbers?

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

      It should be -1 -2 -3 -4 -5 -6 -6 I think.

      edit: no, need to minimize the max value as well

      basically a modification of the original idea should work: keep breaking into two till remaining length is greater than current count, i.e. it will lead to a minimum max value.

      Then, keep breaking the smaller end.

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

    agree!

    stuck on pretest 5, and i think my code is right.

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

      Exactly, I don't know what Pretest 5 is, but it seems to be very big because I received a RTE when I make my array size very small

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

    The link doesn't work. How did you figure out what the juri's answer is?

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

      The hacks link is invalid until the final standings are published.

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

    should output be -6 -6 -5 -4 -3 -2 -1 of 1 7

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

      no. -2 -2 -2 -3 -4 -5 -5 is correct.

      since -2 < -1 (the max value shoudl be minimized)

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

        with 1 7, I had the output: -2 -3 -3 -3 -3 -3 -3

        Actually I don't know what is the right answer

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

I presume you have overestimated the power of Div 2. A bit.

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

Obligatory rage comment about round being unrated.

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

How did people manage to get pretests passed on problem B? :D

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

    a priority queue solution passed.

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

      I was getting memory limit exceeded with priority_queue.

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

        Check for some runtime error in your solution. Sometimes undefined behavior causes element to be added indefinitely and hence the memory error. (Its just one of the causes, perhaps the real bug may be different )

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

            You are not at all dealing with cases where no answer is possible. Check out the case "13 2" in sample input of the problem.

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

              Sorry...I edited that...https://ideone.com/1HOrNz

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

                What is the problem? I see you passed systest. Can you please elaborate on whats the problem/issue?

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

                  The Problem is when there are negative values.....Input:1 7 Output should be -2 -2 -2 -3 -4 -5 -5 instead of -2 -3 -3 -3 -3 -3 -3...as -3 < -2....

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

                  Thats because you are always picking up the max element, popping it and putting in element-1 2 times.

                  How your queue works is as-

                  1 i -(input)

                  0-->-1,-1>>-1,-2,-2-->-2,-2,-2,-2>>> (similarly the 3 of the "-2" turn into "-3,-3" and we reach limit of 7,after which the for loop exits).

                  What you may try to do is, after the final size is obtained, for any 2 same elements, which are not the max elements, do this-

                  1. Remove those 2 elements, add 1 element+1.
                  2. Remove the last element. Add 2 "Last element-1" again.

                  So, what it will do is, for "-2,-3,-3,-3,-3,-3,-3", the steps will be like-

                  -2,-3,-3,-3,-3,-3,-3==>-2,-2,-3,-3,-3,-4,-4==>-2,-2,-2,-3,-4,-5,-5.

                  I think this should be correct (any improvements are appreciated :) )

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

                  @vijju123 you cant always do (1).

                  it might increase your max value. -2 -2 combining to give -1 as the first element.

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

                  What you may try to do is, after the final size is obtained, for any 2 same elements, which are not the max elements

                  I took care of that condition there.

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

                  @vijju123 should work

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

    If you write it to do lexicographic ally smallest instead of largest, you will pass pretests.

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

Un...f***ing rated?

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

Shit, if pretests of B are correct(?) why do you make round unrated?

My solution is passed and I think my solution is correct. Probably there is problem in checker that gave wrong answer on correct solutions which printed something different...

I found mistake in my solution xD

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

I felt that B was a really bad problem...

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

RIP writer contribution score

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

    Currently it is : -57

    whereas it was +1 earlier (google cache), certainly it did fall to rock bottom.

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

Most unfortunate because of a serious issue. Anyway, still thanks for the contest, other problems were good! ;)

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

Round unrated but Interesting Problems. Making it unrated in last half hour of the contest is little disappointment.

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

Fucking shit..How the fuck some people solved B?

I went mad solving that problem.

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

    I think that problem C is easier than B. And both are really cool!

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

      Oh no..It doesnt matter. I wasted my whole contest just to get B accepted. I was not able to think of a logic to sort number lexicographically which does not exceed time limits.

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

      are really shit*

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

    Their mind works like the red coder who coordinated this round.

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

    emm... I can understand how upset you were after the round declared unrated, but don't you think we should keep a good environment for Codeforces, therefore, no f***ing... And sorry for my poor English...

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

uhhhhhhhhhhhaaaaaa, I have done 7 successfull hacks and this round will be unrated:)

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

Even though the round will be unrated, I liked the problems a lot! Kudos to the authors!

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

3 problems got pretest passed and the round is declared unrated!

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

:( I was frustrated by lots of WA from pB...

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

My algo for B was absolutely right and the only problem was there in implement lex. sort which was exceeding the time limit.

I went mad when I saw some people solving it with time of about 15ms.

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

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

I hate of hearing "The round is unrated" in the middle of the contest and I prefer not to go on.

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

Kuttar baccha , notir pola , tor bal taina taina chirbo ajke , specialist hoite partam , bal falao ??? jotoshob

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

It's a shame, because D and E seemed like very interesting problems.

Apart from B, I thought the problem set was good (perhaps a little too straightforward with C). That said, I was going crazy trying to figure out how over 1000 people got B.

In any case, mistakes happen, so it's not a huge deal.

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

What was the issue in B? I did not understand the explanation.

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

My dream is to be an expert, and the day I have the opportunity, you destroy my dream :(

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

interesting problem, anyway, could someone tell me the right solution of problem B? I solve B with the wrong solution, but get passed

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

You should not write at least the closing line of the blog. :(

»
6 лет назад, # |
  Проголосовать: нравится +254 Проголосовать: не нравится
"Jamie is preparing a Codeforces round. He has got a idea for a problem, but does not know how to solve it. Help him write a solution to the following problem:"
Problem B. Jamie and Binary Sequence
*****
Unfortunately, the writers and coordinator solutions for the problem B are incorrect. The round will be unrated. We apologize.


D and E are pretty interesting (shoutouts to D) but I think they probably take too much time to code when put together in the same round.

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

it was a realy good contest despite that problem B

»
6 лет назад, # |
  Проголосовать: нравится +33 Проголосовать: не нравится
if(rank<=300)
    CF="UNRATED";
else
    CF="RATED";

:)

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

Any1 wanna solution for B..

Here it is

https://ideone.com/0HvwUB

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

Plz make the round semi-rated :(

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

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

Can D be solved using implicit persistent segment tree?

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

After a week of no contest We got "Unrated" one disappointed :(

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

Why turning the round unrated?!

Make it unrated for only those who got affected by problem B.

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

So what will happen to problem B? Will it be deleted or will the solution be corrected?

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

So next time, Never ask if the contest is rated or not .. Who knows anyways xD

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

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

B is tough. C is lot easier than B

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

A and C got AC ;)

is this why B has some mistake :P

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

when you did your best on the contest and it's unrated!!

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

Unfortunately both author and my solutions for today's problem B were based on simple, nice (and incorrect) greedy idea so they are incorrect. Now we found correct solution for this problem, but answer for some pretests differs, so it's impossible to make this round rated. Of course I did some stress testing for this problem, but my bruteforce was really slow, so it was impossible to check solutions on most of the tests and greedy idea seemd clear and correct, so there were nothing to worry about. However the most simple greedy is incorrect here (it minimises y, but doesn't produce lexicography maximum sequence). You can check your solution on test "1 7". Answer for it is "-2 -2 -2 -3 -4 -5 -5". Of course we will desribe correct solution in the editorial. We are very sorry about it and will try to make everything to make this not happen again.

=========================================

К сожалению и моё и авторское решение к сегодняшней задаче B были основаны на простой, красивой (и неверной) жадной идее, поэтому они оказались неверны. Теперь мы уже знаем верное решение для этой задачи, но ответ для некоторых претестов был неверен, поэтому невозможно сделать этот раунд рейтинговым. Разумеется, я провёл стресс-тест решений к задаче, но мой перебор был очень медленный, поэтому было невозможно проверить решение на большинстве тестов. Кроме того, решение казалось очень простым и понятным, поэтому ни у кого не было повода волноваться по поводу решения. Однако наиболее простая жадность тут неверна (она минимизирует y, но не выводит лексикографически максимальный ответ). Вы можете проверить своё решение на тесте "1 7". Правильный ответ для него "-2 -2 -2 -3 -4 -5 -5". Конечно мы опишем правильное решение в разборе. Мы приносим глубочайшие извинения и постараемся сделать всё возможное, чтобы это никогда снова не произошло.

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

    is it correct for input 1 7 ? Yes -2 -3 -3 -3 -3 -3 -3

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

    Even though I also made same mistake as the authors and you, and got AC. I believe that this mistake must be only made my idiots like me.

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

    My solution gives -2 -2 -2 -3 -4 -5 -5 which is correct but I fail on pretest 5 so I'm assuming it's one of the pretests that they got wrong

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

      how did you solve?

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

        Consider the binary representation of n For each number i that 2^i is in the binary representation put i in the answer list.

        now update the answer list as follows until it's size is equal to K

        while (len(list) < k):
          if (len(list) + count(maximums) <= k):
            remove all maximums and put two (maximum - 1) for each one you remove
          else
            turn a min element into two (min - 1) elements
        
  • »
    »
    6 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    I am getting the same answer for the aforementioned test. And I was getting wrong answer in test #5. Can you please reveal the pretest #5?

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

Unfortunately, the writers and coordinator solutions for the problem B are incorrect. The round will be unrated. We apologize.

WTF! -_-

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

I found problem B very interesting and loved the priority queue solution. I thought it was completely correct and had no clue it could be wrong, so I'm not surprised at all that authors did not realize the incorrectness of this solution too.

Please, don't be angry on them. I enjoyed this round a lot :)

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

Худший раудн . Задачи Туфта . Туфта!

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

Probably author solution fails in test n=20, k=4. Correct answer is {3, 3, 1, 1} while my passed gave {3, 2, 2, 2}.

Oops, sorry, didn't see above comment of vintage_Vlad_Makeev.

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

найс кф пацыки. продолжайте давать прикольные задачки

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

Those red in top 10 who got B correct should be moved back to Div 2.

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

1500+ people did the same mistake as the setter's solution?? :o

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

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

The round is rated....

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

"... Let me close this blog post by answering the most frequently asked question in Codeforces. This round is ..." 0-rated

On a more serious note, setters should not sub estimate easy problems. I had a similar experience with my problem KNICOV at CodeChef. The moral is that we have to double check greedy problems and have a formal proof.

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

Come on guys, no need to be so harsh.

Everyone makes mistakes. Maybe they had a rough day and didn't properly check their solutions. Look at the number of up votes for this announcement before and after the UPD.

It is tougher to come up with a quality question than to solve it so we have to appreciate them.

Good job guys!! Make sure you double check your solutions next time ;)

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

I think the correct answer is more important than rating.

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

Why "Idleness limit exceeded on pretest 1" in http://codeforces.com/contest/916/submission/34316902 ?

UPD: This happens because I am trying to read an integer in queries and removes

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

Can someone please explain solutions for problems D and E?

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

    For D, you can use a implicit persistent segment tree to keep the values of the words and another to keep the amount of words with value equals to X.

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

      i know persistent segment tree and implicit treap but what is this implicit persistent segment tree what are it's applications ?

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

    for D, i think just use pbds and some implement... but i didn't do it before the end of the contest

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

    For E, let's solve a simpler problem, suppose you just have to change the root and query the sum in a subtree, if we preprocess the sum of subtrees with the tree rooted at X, there's only three cases to handle when answering queries to a vertex V,
    if (current_root = V), the answer is the sum of all nodes
    if (current_root in V subtree), the answer is the sum of all nodes minus the sum of nodes in subtree of vertex that leads to current_root in the sons of V
    if (current_root not in V subtree), the answer is the sum of the nodes in the subtree of V

    To process the updates you have to find the lca(u,v) considering the tree rooted in current_root, the vertex is one of the nodes in {lca(u,v), lca(u, current_root), lca(v, current_root)} and then you process the update similar to the queries, to update a subtree and to query the sum in a subtree, you just need a bit and euler tour.

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

    and these are very interesting problems for me

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

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

How about the system test for B?

Can the first successful submission be considered as the last submission? (for time and for score)

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

problem setter make bug in problem B program and this round unrated if the solution of problem setter can accept, I think the problem is a good problem But problem D, E are very trouble, I don't think DS and long code and many details can be contest good if the round is div 2 , please problem setter use some hard and not template problem

so if the solution of problem setter can accept B, I also think this round should be unrated

the contest value > the contest rating :)

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

Nice contest dudes too bad it's unrated but the problems were good!

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

Alternatively u guys can fix B prroblem description to "Of all satisfied sets with elements sorted in non-increasing order, print out the lexicographically smallest one. THEN greedy sol would be correct.

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

Common guys mistakes happen. Don't discourage problem setters

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

Is it good idea to change statement of problem B — only minimize max(a_i)? In this case problem is good for div2B and all solutions will get ok.

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

    Yes , Then the question gets quite easy right , just calculate the exponent of 2 for which (2^exp)*k >= n (i.e all k terms are exp initially) and exp will be the max a_i and decrease the remaining a_i's such that sum = n and print them .

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

Lesson to problem setters: If you are including a greedy problem, write a Formal proof of it. If you say after contest that the greedy solution seemed correct, I think it straight away implies that there was no formal proof written / verified.

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

Pretest 5 of Problem B gives me another chance to look my life again, how almost competitors wrong here?

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

It was the first experience of contest setters. Sure, in the next time they will make better contest. Everything is ok.

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

You guys need to calm down a little bit. In the end, this is just one round that, in the long run, will have very little impact on your life. Everyone makes mistakes. There's no need to curse out the problem writers, who clearly worked hard to make interesting problems. I can't imagine the difficulty it takes to write a set of problems that have absolutely no flaws in them, and most people complaining can't either, since Div 2 people rarely write rounds.

It's not the end of the world if one round you were doing well on goes unrated. If your performance was part of a trend, you'll do well on future contests. If your performance was an outlier, then future contests would have corrected your rating anyway.

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

Because problem B and the unrated contest they got more than (-100) on this post

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

why system testing is too slow ? -_-

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

For problem E, is it:

1. dfs the tree and build LCA and record the dfs order
2. build segment tree
3. do query

?

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

worked on B for quite a long time but can't solve. feel released now.

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

Over 250 test cases for problem A... personally I think 50 would be enough and thanks to that judging time would be much shorter :P

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

Can you please reveal the test #5 of problem B?

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

I wish I was the writer of this round, so I can get a lot of downvotes.

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

Very cool round!(no)

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

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

You end up in fourth in the contest and then the contest was declared unrated, so sad

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

How to solve D and E ?

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

"Джейми готовит раунд на Codeforces. Он придумал задачу, но не знает, как её решить. Помогите ему решить следующую задачу:"

Самоирония? :D

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

i don't get the point of putting Persistent Implicit segment tree in the D problem if someone has a decent template of it he can solve it in a little under 30 minutes i think putting a problem that required more thinking would have been better.

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

    i don't get the point of putting Euler Tour Tree in the E problem if someone has a decent template of it he can solve it in a little under 30 minutes i think putting a problem that required more thinking would have been better.

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

Don't you guys think that putting a persistent data structure problem on Div. 2D is not suitable ? I was going to compete in a Div. 2 contest for fun. However, got stuck on problem B and D........ :(

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

    I agree with you.I have no idea to D and E. They are not friendly to us newbies.

    I also made lots of small mistakes when I held a small contest in my school for the first time. So I believe the tiny flaws of this round are acceptable. I wish the authors,coordinators and testers will prepare a better round the next time.

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

    Coincidentially I was first exposed to "persistent" data structure problems was also a div2D.

    http://codeforces.com/problemset/problem/707/D

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

    I remembered I saw a problem which is several yrs old and is a div2E. It's just dfs order. Now it is dfs order + segment tree + lca. So we can conclude that the average intelligence of human beings is increasing right? haha

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

ваша тестирующая система некорректно работает, у меня ответы все правильные которые вы выдаете за неправильный ответ!!!

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

expected that situation after phrase "He has got an idea for a problem, but does not know how to solve it."...