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

Автор nolifeblackbird, история, 5 часов назад, По-английски

Yesterday, I have participated in the Codeforces Round 969 (Div. 2), and I have realised that the task A was easier than B.

For task A (Dora's Set), you had to know that for any natural number x, gcd(x, x+1)=1, and for any odd number x, gcd(x, x+2)=1. Because of that, if x is an odd number, than the three distinct integers that satisfy the conditions would be x, x+1 and x+2. And thus you can find the answer (l-r+1)/4 which is increased by 1 in some cases.

For task B (Index and Maximum Value), you only had to realise that no number is gonna pass the biggest number because before it passes it, it has to become equal to the biggest number, but when it becomes equal then in any operation that the biggest number was increased, that number is also gonna be increased. Because of that we can only see in which operations the biggest number was increased or desreased, perform those operations on that number and we get the answer.

So for task A you had to know math which is not really easy, and for task B you just had to realise what I explained (if you didn't understand me, you can see the editorial), which is not harder than the math in A.

My question is: Can someone please explain why A was placed before B? Thank you for advance for your answers.

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

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

A still has more accepted submissions* though...

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

    Hmm... yeah you're right. I haven't looked at that...

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

    It could be because some people thought B was harder so they solved A and then didn't have time for B though

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

I believe A was not harder but observation was tough part there like thinking of that if any sequence of 3 starting from odd will result in gcd of 1 and that count will be only the max is definitely tough.

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

1) Difficulty is subjective. To me personally, $$$\gcd(x, x+1)=1$$$ is common sense and $$$\gcd(x, x+2)=1$$$ for all odd $$$x$$$ is also common sense. However, B wasn't that obvious and I overthought the problem.

2) It's just Codeforces bruh, chill man. It's not that deep lol. The order of the problems isn't the most important thing. The most important thing is that we solve the problems and improve.

3) Rather than whining about unimportant things like problem order, how about you upsolve the problems regardless of their order and focus on doing better on the next contest?

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

    I'm sorry if this blog upsets you or anything, but I just wanted to see why A was placed before B. I won't post these kind of blogs anymore if it makes you feel better.

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

    I was not aware of gcd(x, x + 2) = 1 for all odd x , thanks for the explanation.

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

I found A harder as well. I didn't prove it during the contest. But thanks to this blog, I discovered a beautiful proof for Euclid's algorithm gcd(a,b) = gcd(a%b, b) using sticks.

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

Knowing the math is good since in the later problems you are done for if you cannot do it, but I think it will be for the best if A and B are attempted on the basis of observation and intuition. Of course what do I know, I'm just a pupil like you :(

But yes, I agree A was tougher than B.

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

I solved A by noticing some mysterious connection between $$$\frac{r-l+1}{4}$$$ and the answer in the sample, before I realized I can take as many odd numbers as possible.