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

Автор wuhudsm, история, 4 дня назад, По-английски

Please note that the contest's rated range and duration has both increased. Further, the round is being held in ICPC mode with 10 minute penalty.

We invite you to participate in CodeChef’s Starters 174, this Wednesday, 19th February, rated for users with rating < 2700.

Time: 8:00 PM — 10:15 PM IST

Note the round is being held in ICPC mode with 10 minute penalty.

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

UPD: congrats for the winners!

  1. Nachia

  2. yydtq

  3. potato167

  4. snuke

  5. Kude

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

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

A codechef contest

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

I’m excited to participate in CodeChef Starters 174 and Good luck to everyone!!

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

good luck and i hope you enjoy the problems.

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

    Is there any specific reason as to why contests are being held in icpc mode. I mean I am not against it but I really enjoyed the freedom to submit wrong solutions in a row.

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

Why back-to-back <2700 rated? There are only around 20 active 2700+ and only excluding them is almost meaningless.

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

    hi, you make a valid point. I thought div1C (and maybe D) were somewhat standard for lgms, while EF would be hard enough (Nachia nearly proved me wrong, i have no clue how someone solves E in 16mins, have you seen it before?)

    For the future, I will try rating for all if I have such a scenario. As you can see the rated range was updated late because I realized it was too hard (and also too nice) for 6*

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

      There is an additional reason we shouldn't cut at 2700. Due to the rating system of CC, newcomers have pretty high volatilities (though 2700+ with many contests has so low volatilities that in one contest their abs(delta)<=30). If strong newcomers(, or new accounts) with slightly lower than 2700, they will experience huge delta (kinda +50~+100), and 2700+[0,100] have nothing to do. TBH this phenomenon is common for lower divisions, but I think it shouldn't be happened at active rank 20.

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

As a tester, I forgot to test.

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

Contest starts in ~30min.

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

As a tester, get better.

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

I just opened problems in CC but I didnt submit any so it wont be rated for me right?

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

Can anyone point out how to check good pair ? I know doing cur=0 after finding mexi is wrong

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

Extremely easy guess solution for problem GCD Add Size.

  1. I knew that multiplication of primes rises faster than the array size which is just an add operation and multiplication always is faster.
  2. From this I realized that I just have to look at divisors of a number upto a certain value and max till $$$sqrt(n)$$$. I experimented with this value and go 50 to be working

This is my solution.

Main Code

Solve

I still don't have a proof for this but I had this intuition for multiplication rising much much faster than addition and I just guessed it to be 1e5 then 1e3 and then 50 and it worked. Anyone having some definite proof or a counter case Dominater069?

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

    Your Output:2602.
    Expected Output: 2603.

    Edit: This shows that you must check all factors till $$$sqrt(A[i])$$$, which is the same as checking all factors.
    Also, where does the multiplication of primes intuition come from?
    $$$gcd$$$ does not necessarily grow with primes.

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

      Thank you for this. The main idea which I thought of was say there are numbers like $$$p1*p2$$$ and both greater than some number which I took 50 then it is always beneficial to take the largest number +1 rather than finding a common multiple among them and then adding length to it. I mean a single number with multiplication of a number greater than some threshold is always more than finding a common value(GCD) + length.

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

        Your idea works, but the chosen cutoff must be 2n (Submission).

         Let freq[i] = the number of times i occurs in A.
        Let m = max(A).

        1. B contains one distinct number (x):
          f(B) = x + freq[x].
          So, answer >= m + freq[m] >= m + 1.
        2. B contains 2 or more distinct numbers:
          gcd(B) <= m / 2.
          => f(B) <= m / 2 + n
          To change the answer, f(B) >= m + 1.
          => m / 2 + n >= m + 1
          => n-1 >= m / 2
          => m <= 2n-2
          => m < 2n

        If m >= 2n:
          answer = max(x + freq[x]) for all x in A.
        Otherwise:
          Use O(n * sqrt(A[i])) = O(n * sqrt(n)) fallback algorithm.

        I tried to use latex but it gave this message and does not let me post: "The comment contains source code without markup.".

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

I don't know why my code give wrong answer for the 6th test case for MEXSUM ~~~~~ My submission