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

Автор YouKn0wWho, 2 года назад, По-английски

UPD: (28 April, 2022)

Donated Finally

আবার চলে এসেছি! (That's Bengali for "I am back! (in Terminator mode)")

I am super excited to invite you to participate in Codeforces Round 752 (Div. 1) and Codeforces Round 752 (Div. 2) which will be held on Oct/30/2021 17:35 (Moscow time). This round is rated for both divisions.

You will be given $$$6$$$ problems in each division and $$$2$$$ hours to solve them. All the problems are authored and prepared by me.

I would like to thank -

The statements are short and directly ask you what to do and I have tried to make the pretests strong. I highly encourage you to read all the problems.

Solve problems and help the poor! Yes, you heard it right, this time you can help the world by just solving problems. I will donate money based on the solve count of each problem by the following measure:

Donation Per AC

The total estimated money is half of what I will get from Codeforces for this contest(but you can make it more by just solving more problems!). I am a student, so pardon me if that's too little.

Also, did you know that you can still upvote my The Ultimate Topic List blog and make it to the top?

Finally, I would like to dedicate this contest to me! I want to thank me for believing in me, for doing all this hard work, for trying to do more right than wrong. I want to thank me for just being me at all times.

Score distribution:
Div.1: $$$750-1000-1750-2500- 3500-3750$$$.
Div.2: $$$500-1000-1750-2000-2750-3500$$$.

Good Luck! Love you blobheart.

UPD: Editorial

UPD: Congratulations to the winners.

Div.1:

  1. tourist
  2. djq_cpp
  3. Petr
  4. gop2024
  5. ecnerwala

Div.2:

  1. Rolling_Code
  2. Pecans
  3. fangzhijina2020
  4. whtdsjmr
  5. Graphcities

UPD: Here is how the donation amount looks like:

Donation

FYI I will get 400 USD for this contest. So the donation amount is indeed half of this as I have estimated before the contest, although didn't think that it would be this accurate.

I will update you again when I get the money from Codeforces, more likely after a few months as I haven't received my previous contest's payment yet which happened 3 months ago!

Also, thanks for being a part of this. You have just helped someone who is in need (I mean after I distribute the money).

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

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

Donation per AC!! Just loved it. Proud of you vai ♥

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

no funny text this time? :P

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

"0.005 USD" WOW THANKS MR.GENEROUS

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

    I see your negative comments almost in every recent blog posts. Seems like you have opened this account just to pass rude comments!

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

If someone can help the poor just by solving problem, that's gonna be more fun!! :D

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

Yet another great round is coming ! :D

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

Great Initiative

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

That's great Shohag. Hope everyone will enjoy this contest.

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

Wow, that's great. Hats off to you.

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

Proud of you, bhai. <3

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

Super excited for a Bangladeshi round again!! :D

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

Very Good idea for helping poor people. Thanks for this contest. I am so happy that I can help poor people.

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

Hope for 2K upvotes and Rank #1 in top contributors.

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

:(

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

Inviting the fellow programmers to be the part of this initiative....

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

Let's send YouKn0wWho vai(brother) to the Mars by upvoting.

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

এভাবেই বারবার চলে আসবেন ভাই ♥♥

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

Very excited to praticipate of a bangladeshi round.

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

Donation per AC!! Too good to be true.

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

Again , pari na pari khela hobe :3 (it means i will must participate ,dont downvote)

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

Your last round was extremely good. I hope this one is as well.

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

For a moment I thought why the blog has only 166 upvotes(previous round announcement has more than 1600) then I realized that you are back with a new round .

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

Really looking forward for this one after the last round. Also props on the idea for donations <3

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

Super excited Vaia. Take Love.

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

Codeforces Round #752, writer: YouKn0wWho

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

As a tester, these are some of the coolest problems I've encountered in quite some time. So if you're going to participate, you're in for a treat!

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

as a tester, I would say the problems seemed very cool to me. don't dare to miss the contest and the potential high rating! Good LUCK all!

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

just curious.. how much does codeforces pay one for setting up a contest?

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

Hyped for more anime references in the questions lol

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

So if I participate from Div1 and solve all problems, you donate 6.255 USD, that's nice. But that's too tough, I'll just donate 7 USD myself instead.

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

dorijanlendvaj for providing a test case which will potentially prevent few wrong solutions from getting AC.

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

    I don't have any say over whether it will be in pretests, YouKn0wWho just asked "Is there a test case that accomplishes [REDACTED]?" and I responded with a test case that does.

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

Eagerly Waiting

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

Hello everyone. Good luck to everyone on the contest and a good rating!

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

Finally, I would like to dedicate my participation in this contest to myself, for doing all this hard work, for trying to get to Expert. I'm just so grateful to myself for being me at all times.

<3

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

♥ ♥ ♥

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

osthir vai <3

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

Positivity Everywhere!!!

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

This is the first time cheaters will actually do something good to this community lol

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

but what happens if someone leaks div2F and 1000 people copy it

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

Masha Allah

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

Last contest by YouKn0wWho, I gained 125 points. To date, it was my best contest ever.

Update: Candidate Master this time

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

Should we be concerned that the author has a monetary incentive to make weak pretests?

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

    Nah I think we should be more concerned that your rule might be coming to an end.

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

    I guess if he had any monetary incentives, he would prefer not to introduce a donation system at all

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

      That's not fair. The donation system is the political move that dethroned 1-gon!

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

    Should we be concerned my words have come true?

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

      Yes, we should be celebrating the new ruler.

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

        I honestly can't tell if you are being humble or trying to get upvotes. Let's stick with the former.

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

Thanks for the generosity and look forward to this round!

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

Hope I can donate more than 0.02 in this round :D

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

I hope this will be super exciting contest like here

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

Deleted

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

Okay, after reading the full passage, i am getting more positive vibes about the contest.

Looking forward for a great contest and a motivation to keep me going.

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

Poor-force will help me come to master this time

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

Monogon are you scared of YouKn0wWho??

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

অপেক্ষায় আছি, ভাই।

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

Second time participated in your round! Love it.

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

YouKn0wWho is one of the best setters I know in Bangladesh.

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

Again 1k+ upvote Sohag brother ........ <3 Keep ahead

Hopefully #752 will be interesting

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

Good luck too all :)

»
2 года назад, # |
Rev. 2   Проголосовать: нравится -16 Проголосовать: не нравится
ignore if you don't like memes
»
2 года назад, # |
  Проголосовать: нравится -135 Проголосовать: не нравится

...you can help the world by just solving problems.

That's quite an unique idea! At least for me this is my first time to participate in such contest.

Hope for a great contest!

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

Where will you be donating the money to?

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

Solve problems and help the poor! <3

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

As a tester, I recommend the contest to you all. As a contestant upvote the blog, or else ...

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

The statements are short and directly ask you what to do. Thanks for assure it and not to make the statement gazakhori and azaira pechal. :D

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

Thank you YouKn0wWho for keeping the problem direct and short. And your previous blog is helping a lot. ^_^

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

Apart from the contest it will be more exciting to see YouKn0wWho as the number one contributor ;D

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

number theory — "I am back too" xD btw great initiative ❤️

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

"Donation Per AC". Go ahead with great work vai.

»
2 года назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится
Meme: It's close
»
2 года назад, # |
  Проголосовать: нравится +129 Проголосовать: не нравится

Upd:

Div2B: 0.005 -> 0.006

Div2C: 0.005 -> 0.008

Div1F: 4 -> 2

I hope now the distribution is more consistent with the point values of the problems.

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

I want to become Grand Master!

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

Great initiative, you are doing a very good job. Thank you!

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

According to the rating predictor for last contest (education 116), my rating will go up to 1905. That means this will be my first time to participate div 1. So excited.

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

it's really good stuff that you are doing with this job, respect!

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

My solution for B here, https://codeforces.com/contest/1606/submission/133495767, fails in test 6. It appears to be some rounding errors. Does anyone know what caused it?

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

I want to take part in this contest but tonight, Liverpool — my favourite football cbub have a match wwith Brighton :(((

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

    I gave contest on the day pakistan beat india for first time in cricket world cups in 29 years . so deal with it .

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

      let me think, I think I can watch the first 30 mins and after that, I join in the contest =)))

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

অনেকদিন পর আজকে পার্টিসিপেট করবো ভাই :) ভাবতেই ভাল্লাগছে...

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

Looking forward to my first Div 1 round!!

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

Alhamdulillah.. Great achievement! YouKn0wWho is now top contributor from Bangladesh. Proud of you man!

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

It is good round!!!

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

Excited for this one as it`s gonna be my first contest on this platform!! Looking forward to gaining some nyc ratings .....

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

As a Bangladeshi Participants, proud of you bro

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

Congrats on becoming the new top contributor! Remember, great power comes with great responsibility.

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

If I'll solve E/F and resubmit it 9 more times, will you donate 20 USD?

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

    But they have to pass the main tests and sadly CF skips multiple AC submissions for each problem :((

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

This alone made the contest worthwhile YouKn0wWho

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

I locked one of my codes for hacking but I cannot view the locked solutions of other users in my room. Kindly fix it YouKn0wWho

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

Very interesting problems! Thanks to creaters of this contest!

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

Great problemset, but div2-D was quite easy compared to 2000 rated problems i think.

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

D was too easy tbh. C made me realize how dumb I am once again. Nice contest tho

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

    Was it? I spent over an hour staring at it and couldn't come up with solution xD

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

    Took me an hour to do it :|

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

    What approach did you used for D?

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

      Did bruteforce and found the pattern.

      if(x==y)cout<<x<<"\n";
      else if(x>=y)cout<<x+y<<"\n";
      else cout<< y-(y%x)/2<<"\n";
      
      • »
        »
        »
        »
        2 года назад, # ^ |
        Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

        To add to this, a little bit more explanation on how I personally came up with $$$y-(y\mod x)/2$$$:

        Suppose $$$x\leq y$$$. We want to find a $$$n$$$ such that there exists integers $$$k,l,b$$$ that satisfy $$$n=kx+b$$$ and $$$y=ln+b$$$ (and $$$b<x,b<n$$$).
        We can see that any valid $$$n$$$ has to satisfy $$$x\leq n\leq y$$$ (*), so $$$k,l\geq 1$$$.
        Expanding $$$y=ln+b$$$, we get $$$y=(lk)x+(l+1)b$$$. This means $$$(l+1)b=y\mod x+ax$$$ for some integer $$$a$$$.

        To construct a valid solution from here, note that since $$$x,y$$$ are both even, we can set $$$a=0$$$ and $$$l=1$$$ (since RHS is also even). This gives in a valid $$$b$$$ and $$$n$$$, which is exactly $$$n=y-(y\mod x)/2$$$.

        (*) To elaborate on why $$$x\leq n\leq y$$$: If $$$n<x$$$, $$$n\mod x=n$$$ but $$$y\mod n$$$ can't be $$$n$$$. If $$$n>y$$$, $$$y\mod n=y\geq x$$$ so it can't be $$$n\mod x$$$.

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

      I found the pattern after bruteforcing testcases, dont know why it works.

      basically if x>=y, ans is x+y, else y-(y%x)/2

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

    Maybe I just happened to figure out the pattern

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

Thanks for great contest! I was late for an hour because of my classes but still participated in order to help charity!

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

Countforces Round #752

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

Problem 1604C - Di-visible Confusion is logical problem ...... I didn't solve this.

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

    Did bruteforce and found the pattern.

    if(x==y)cout<<x<<"\n";
    else if(x>=y)cout<<x+y<<"\n";
    else cout<< y-(y%x)/2<<"\n";
    
»
2 года назад, # |
Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

How to get rid of TLE in pretest 5 in div1C?
I needed to get the possible next numbers can appear after index i and their count also. To do that, I needed to maintain a set.
133677385

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

Why a lot of solves for D div2 -__- ?

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

Why do I think $$$O(n\sqrt n\log n)$$$ can pass 1e5 in 4s?

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

    It can pass. But set runs too slow that I have to replace it with array+sort :(

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

    Actually $$$ \log n $$$ is unnecessary

    We Only need $$$ O( n \sqrt{n}) $$$ (Assume $$$n = \max a_i$$$)

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

      Lol now I feel dumb... I used a seg tree to query on $$$O(\sqrt{n})$$$ different intervals, of course I didn't realize they will all go to the same state in the next step so there are at most $$$O(\sqrt{n})$$$ different states at any step lmao.

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

Good Contest , I misread D to be find number of n from 1 to 2e18 which satisfy that condition , in the last 20 mins after looking at number of submissions I read it again , felt horrible and then mind stopped working . Anyways good contest man .

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

How to solve C?

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

    Let me know if you find out about approach for C. Managed to solve div2 D but couldn't solve C :(

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

      you can iterate over array and count number of items that mod(i+1)!=0
      moreover at each step you should include items that mod(i+1-1..current_count)!=0
      if at some step you found items that mod(i+1-1..current_count)==0 then answer is NO otherwise YES

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

    the problem is saying check if at least one number from 2 to i+1 isnt a divisor of a[i]. Its enough to check from 2 to min(i+1, 40) cuz lcm of 1...40(or so) is too big for a[i] to fit

    This is so because for the current number, if any number before it cannot be removed, ans is No. Else, you can remove some numbers and check if current number is divisible by i+1-count of previous numbers removed which results in the range 2 to i+1(notice removing numbers after current one does not affect the position so its pointless for current number)

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

The problems were very interesting. I felt dumb after getting the idea of every solution I could xD

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

Can someone tell me what I did wrong in C: If there exists no element a[i] which is a product of all the numbers (i+1)*(i)*(i-1)...2, then we should output YES. Is this correct?

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

$$$q$$$-binomial? Are you serious?

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

    Sadly we didn't know about this. But it's true that we were afraid that some chinse guy would use some weird stuff to solve the problem. I hope you liked the other problems.

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

I got the idea of Div2D 10 minutes after the contest. I hate my life

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

How to solve div2 C? Managed to solve div2 D but blundered in C :|

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

Nice contest. But lots of maths (:

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

Didn't really like Div2 D. It's a very simple solution, and either you find it very quickly or you sit around thinking for a long time before you realize it and bang your head

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

    Yea, too me a whole lot of time. At the end it was a simple pattern lol. Did bruteforce and found the pattern.

    if(x==y)cout<<x<<"\n";
    else if(x>=y)cout<<x+y<<"\n";
    else cout<< y-(y%x)/2<<"\n";
    
»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve D ?

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

    Did bruteforce and found the pattern.

    if(x==y)cout<<x<<"\n";
    else if(x>=y)cout<<x+y<<"\n";
    else cout<< y-(y%x)/2<<"\n";
    
  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    i think:

    if(x==y) ans=x if(x>y) ans=x+y if(x<y) ans=y-(y%x)/2

    although i couldn't submit in time..

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

    if y < x then u can choose any n larger the y so that n % x = y holds

    otherwise if y >= x and suppose y % x = z, then if you find the highest multiple of x which is smaller then y and add z/2 to it, n will become evenly match for both numbers meaning n % x will equal to y % n.

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

I think this time orzdevinwang will become LGM finally!

And is he the youngest LGM in codeforces?

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

Can someone give some hints to div1 E . I only have a naive $$$O(n^6)$$$ solution .

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

    I have the O(n**6) solution but only traversing states which are reachable from the beginning and from which the end is reachable, and apparently it's fast enough. Although I guess it depends on which exact states your solution has.

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

      My solution:

      First assume that the sequence is nondecreasing . Then enumerate the first number and do a dp , which record the prefix sum and the last number .

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

        In my case the difference is that after fixing the first number I put numbers from big to small, and therefore my state is what is the maximum allowed number, how many numbers we still need to put, and what is their maximum allowed sum.

        So I guess having "maximum allowed sum" when going from big to small has fewer reachable states that having "sum" when going from small to big.

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

      My states are choosing $$$i$$$ numbers between $$$[l,r]$$$ and the smallest number is $$$l$$$, the sum of the numbers is $$$s$$$.

      How could I improve?

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

Why is the time limit in D so tight??

I have a solution that runs in around 3.4s locally, and is $$$\mathcal{O}(n \log^3 n)$$$ except for a $$$\mathcal{O}(n \sqrt n)$$$ part that takes just 0.5s. I'm sure I could make this pass if I optimised my segment tree more, but the problem shouldn't require that!

EDIT: optimised the segment tree to this special case, and now it passes (133687383). Here's a submission with my usual segment tree code (133688464).

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

Is it possible to do problem C in n^2.

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

Dear YouKn0wWho Your contets are very difficult for me T_T

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

    That's what contests are for, practising and competing and having some fun. Solve some difficult problems rather than solving 200 problems of 800 difficulty.

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

What approaches were supposed to fit into TL and ML in Div1C by the author, and which were not supposed?

»
2 года назад, # |
  Проголосовать: нравится +47 Проголосовать: не нравится
Yes Math is totally 100% Competitive Programming
  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +2 Проголосовать: не нравится

    lol. The final pattern was a simple 3 line code.

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

    Lol, I think my Div 2D code amassed to a couple of lines (really only 3 "important" lines of code). Out of curiosity, did the code work?

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

long long n=55; int m=20; if(m>n){ //code } Is it valid to use comparison operator between long long and int data type?

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

Here is some feedback on the problems:

  • A. Di-visible Confusion: Easy problem, ok.
  • B. Moderate Modular Mode: In general I don't like problems where there is 0 computer science involved, though I must admit that the statement of this one is nice. Moreover, the solution is very clean. Cool problem.
  • C. Extreme Extension: The statement is clean and interesting, but the "greedy" part is easy and the "only few states n/k" is standard. Nice statement, standard solution.
  • D. Artistic Partition: Here I have mixed feelings. The statement is absolutely "who cares". The fact that one may assume $$$k\le 20$$$ is cute. Computing the number of coprime pairs is very standard but always annoying for me. My solution is a DP with all the $$$n\cdot k$$$ states, which is optimized via the divide and conquer technique (likely different from the official solution). It was nontrivial to implement and I enjoyed thinking about how to optimize stuff so that it could get AC. Finally, submitting one minute before the end, I felt the adrenaline rush, which is priceless.

Overall, the contest was very well-prepared and it gave me some strong emotions, so thanks to the authors. The difficulty distribution was perfect. I am eager to read the editorial to find out how to solve D properly.

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

    Can you elaborate on the time complexity of your D? Editorial also mentions D&C and states that its actually $$$O(n \log^2 n)$$$, which I'm a bit concerned about (more like $$$O(n \log n \sqrt n)$$$).

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

      The cost of an interval $$$[l, r]$$$ is given by ($$$q(x)$$$ is a function we have precomputed, namely the number of coprime pairs $$$1 \le a \le b\le x$$$)

      $$$ c(l, r) := q\big(\frac rr\big) + q\big(\frac r{r-1}\big) + \cdots + q\big(\frac rl\big) .$$$

      I think that your doubt on the complexity comes from the fact that computing $$$c(l, r)$$$ may require $$$O(\sqrt{n})$$$ operations (if this is not the issue, please clarify why you think that the complexity might be $$$O(n\log n\sqrt n)$$$.

      The trick is that, with some precomputation, we can compute $$$c(l, r)$$$ in $$$O(1)$$$. We precompute, for every $$$r$$$, the values $$$c(r/k, r)$$$; this can be done in $$$O(n\sqrt n)$$$. Then, we have

      $$$ c(l, r) = (m-l)q\big(\frac rl\big) + c(m, r) , $$$

      where $$$m$$$ is the smallest number such that $$$\lfloor \frac{r}{m}\rfloor > \lfloor \frac rl \rfloor$$$ (it can be found in $$$O(1)$$$).

      Since the cost function can be computed in $$$O(1)$$$, and we are executing the D&C dp optimization $$$\log(n)$$$ times, the total complexity is $$$O(n\log^2(n))$$$ (plus $$$O(n\sqrt n)$$$ precomputation).

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

        Sorry for confusion, I didn't read the editorial, which apparently has the same solution as yours.

        You understood me correctly, the end of editorial mentions solution that uses $$$O(\sqrt n)$$$ per one query. It's now edited, stating that in practice it fits in TL but no proofs provided on the complexity (I think it's still $$$O(n \sqrt n \log n)$$$).

        Btw, I've used this technique like 2 times in recent days, but wasn't able to apply it here, what a shame...

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

in the problem Div2D, why x < y : cout<< y-(y%x)/2<<"\n" ?

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

    If you bruteforce for the values of x and y, it was following a pattern.

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

    Can someone prove it with math?

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

      For x < y, lets take K for which, K*x < y < (K+1)*x.

      The N for this case will be , (K*x + y)/2.

      N = K*x + (y — K*x)/2

      N % x => (y — K*x)/2

      y % N will be y — N (Since 2*N > y)

      y % N => (y — K*x)/2

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

    if x < y, then suppose y % x = z, then if we find the highest multiple of x which is smaller then y and add z/2 to it.. then n % x = z/2 and y % n = z/2, cz they both are even numbers and I can find a midpoint where both numbers multiples distance is same.

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

Nothing is better than doing charity while having an interesting competition!

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

Unpopular opinion: Div2 was only observation and math, no programming. Boring experience.

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

    Sure, but isn't 'observation' key to 'problem solving' which is pretty much what competitive programming is. A keen observer is usually also a shrewd problem solver.

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

      No, but I expected more data structures, algorithm concepts such as binary search.

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

      Implicitly, in your argument, you assume that observation means math (or that, observational problems are inherently mathematical problems). I don't think that's true. Sometimes just observations can come from realizing that one needs a certain data structure, like recognizing the application of segment within a particular context.

      I agree that observation is key to problem-solving, but I don't think this justifies having such a mathematically heavy contest.

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

Does the writer have fetish with XOR? Why so many XOR problems from the same writers?

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

Can someone explain why this code gets WA? I literally did the same thing as explained in the editorial Link: Your text to link here...

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

    You don't read the complete input before printing the output for a test case. Then when you'd try to read the next test, you'd first receive the input left from the previous one.

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

      Yeah I realized that in the meantime. Stupid of me, what can I say. Thanks for explaining anyway!

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

    You don't need to check for all the n elements, just for the first 21 elements.

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

.

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

Just solved Div2 D just 8 sec before the Contest Ends, Love my Life and codeforces

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

It was a math contest, didn't even need computer.

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

There were so many $$$69$$$'s. YouKn0wWho surely loves $$$69$$$.

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

I want to know the name of the man who ranked 2 during the contest and suddently dissappear after system test .-.

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

anyone calculated the final donation amount?

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

My personal feeling — E is much, much easier than D. For me E is a pretty standard task like "you have an obvious DP with huge complexity, optimize it with some observations and harmonic series principle". D's idea is obvious to me too, but implementation and some specific details make it harder for me.

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

Despite my feelings of losing rating and my contribution throne, the problems div1ABC are pretty nice. If I have a suggestion for improvement, it's to have more topic balance. I thought there is too much number theory. (As much as integer division and remainder can be called number theory)

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

Great contest I enjoyed solving the questions and also happy for donating.

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

Silly thing happened to me today, I forgot to save file after removing cerr line and submitted the unsaved file. It passed pretests but TLEd on actual tests. Is there any way to use fast output with cerr?

meme

P.S. use clog instead of cerr

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

The contest was good, though i think it was a bit mathematically. thanks the writers

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

Does anyone know why Itst_boyfriend was removed from the contest?

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

When will ratings update?

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

Can any one make me clear how the O(N²) solution is getting ac in div 2 question C???

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

    Brute force works here because it is not really O(n^2), because actually most numbers can be removed in most positions. So a linear search for such a position does not take n steps but at most aprox 20, and on average about two or three. submission

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

This guy never disappoints. ❤

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

I mistake

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

you know it's a bad contest when problem D has O(1) solution

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

Dear programmers, can you help me? Recently, for fun, I created a team of friends at Codeforces. After the contest, Codeforces sent me an email saying that my solutions are very similar to the solutions of alex_2008, which is in our team. The fact is that I am also alex_2008. And there in the letter it was said that for repeated violations of the rules, they would block my account. Can you tell me what to do?

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

I participated in the round yesterday. I received a mail after the contest that my solution for DiV2 Problem B coincided significantly with two more solutions(My solution -world_classic/133631831 133631831 others solution-keetzo/133671951 133671951 , kaypee284/133672077 133672077) . As the question had a straightforward solution and the other users coincidently may have the same templates as mine so it may have coincided by chance. I request MikeMirzayanov and the team to look into the matter...

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

I am amazed at how accurate your estimation is!!

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

As a tester, hope you got nice rating

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

So I promised that I would donate a certain amount of money based on the number of ACs that each problem gets. The idea was to motivate people to solve problems and at the same time help out real people by just having green verdicts.

The amount turned out to be around 200 USD (I have received 400 USD in total for that contest).

So following that event, today I have distributed Iftar platters (Ramadan Meal) of the same amount among 120 rickshaw pullers and poor people in general. Thanks to Toushiful Ferdous Badhan and Rakib Hasan for helping me out.

Posting here to let you guys know that, hey, your green verdicts helped someone to have a green moment. Also, you solved a div2A problem but that way you just helped someone solve a real div1F problem which is Food (may it be for one day).

We can’t change the world overnight but we can play our parts, may it be very little! I like the analogy of one of my friends which she calls "The Wave Analogy". The particles stay where they are, they just dance and in consequence, a big wave is formed!

food-donation