### YouKn0wWho's blog

By YouKn0wWho, 19 months ago,

#### 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 .

UPD: Editorial

UPD: Congratulations to the winners.

Div.1:

Div.2:

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

| Write comment?
 » 19 months ago, # |   +103 Donation per AC!! Just loved it. Proud of you vai ♥
•  » » 19 months ago, # ^ |   +16 Exactly bro ! I just got surprised that how this man comes with such a amazing idea.
•  » » » 19 months ago, # ^ | ← Rev. 2 →   -7 He should reveal how and where he's donating the money. It's just as important to know that the money will be utilized in the best possible manner.
•  » » » » 13 months ago, # ^ |   +12
 » 19 months ago, # |   +44 no funny text this time? :P
 » 19 months ago, # |   -40 "0.005 USD" WOW THANKS MR.GENEROUS
•  » » 19 months ago, # ^ |   +9 I see your negative comments almost in every recent blog posts. Seems like you have opened this account just to pass rude comments!
 » 19 months ago, # |   +37 If someone can help the poor just by solving problem, that's gonna be more fun!! :D
 » 19 months ago, # |   0 Yet another great round is coming ! :D
 » 19 months ago, # |   +24 Great Initiative
 » 19 months ago, # |   +20 That's great Shohag. Hope everyone will enjoy this contest.
 » 19 months ago, # |   +11 Wow, that's great. Hats off to you.
 » 19 months ago, # |   +11 Proud of you, bhai. <3
 » 19 months ago, # |   +23 Super excited for a Bangladeshi round again!! :D
 » 19 months ago, # |   +10 Very Good idea for helping poor people. Thanks for this contest. I am so happy that I can help poor people.
 » 19 months ago, # | ← Rev. 2 →   +32 Hope for 2K upvotes and Rank #1 in top contributors.
•  » » 19 months ago, # ^ | ← Rev. 4 →   +14 Meme [Tight]
•  » » » 19 months ago, # ^ | ← Rev. 2 →   0 Now his contribution becomes the same as 1-gon lol. Looking forward to seeing him become the top.Update:Now he is the top.
•  » » » » 19 months ago, # ^ |   +10 This is what I get for stating facts. :(
 » 19 months ago, # |   +130 :(
 » 19 months ago, # |   +8 Inviting the fellow programmers to be the part of this initiative....
 » 19 months ago, # | ← Rev. 4 →   +11 Let's send YouKn0wWho vai(brother) to the Mars by upvoting. SpoilerSecondThread once told to send 1-gon to the moon by upvoting. Trying to copy him. :) https://www.youtube.com/watch?v=FsQPMmRhUGA
 » 19 months ago, # | ← Rev. 2 →   +5 এভাবেই বারবার চলে আসবেন ভাই ♥♥
 » 19 months ago, # |   +8 Very excited to praticipate of a bangladeshi round.
 » 19 months ago, # |   +6 Donation per AC!! Too good to be true.
 » 19 months ago, # | ← Rev. 2 →   +21 Again , pari na pari khela hobe :3 (it means i will must participate ,dont downvote)
 » 19 months ago, # |   +11 Your last round was extremely good. I hope this one is as well.
•  » » 19 months ago, # ^ |   0 That was a tough Math roundhow many did you solve or you like the testcases
 » 19 months ago, # |   +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 .
 » 19 months ago, # |   +2 Really looking forward for this one after the last round. Also props on the idea for donations <3
 » 19 months ago, # |   0 Super excited Vaia. Take Love.
 » 19 months ago, # |   +61 Codeforces Round #752, writer: YouKn0wWho Spoiler
•  » » 19 months ago, # ^ |   +8 The meme has come true
 » 19 months ago, # |   +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!
 » 19 months ago, # |   +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!
 » 19 months ago, # |   +2 just curious.. how much does codeforces pay one for setting up a contest?
•  » » 19 months ago, # ^ |   +24 look at thisThis contest is Div1+2 then CF will pay 400 USD.
•  » » » 19 months ago, # ^ |   +3 Actually i was trying to estimate the total amount and it came up around 350+ dollars. Damn, i should have seen this comment from the start.
 » 19 months ago, # | ← Rev. 3 →   +48 Orz YouKn0wWho
 » 19 months ago, # |   0 Hyped for more anime references in the questions lol
 » 19 months ago, # |   +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.
•  » » 19 months ago, # ^ |   +108 I thought you stopped being a nerd.
•  » » 19 months ago, # ^ |   +79 Or better.. I'll donate 7 USD, so give me solutions to submit during contests. :catThink:
•  » » » 19 months ago, # ^ |   -40 Okay this is bad, now we're plane selling and buying solutions.(give me some I'll give you 14 USD)
•  » » 19 months ago, # ^ | ← Rev. 2 →   -39 Deleted
•  » » 19 months ago, # ^ |   +9 good to see u back
 » 19 months ago, # | ← Rev. 2 →   +241 dorijanlendvaj for providing a test case which will potentially prevent few wrong solutions from getting AC. hmm, a meme
•  » » 19 months ago, # ^ |   +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.
•  » » » 19 months ago, # ^ |   0 Right! i wasn't sure who had a say. I've updated the image now :P
•  » » » 19 months ago, # ^ |   0 Just out of curiosity, What test case of which problem it was?
•  » » » » 19 months ago, # ^ |   +5 It was a test case for long long overflow if modulo is only taken at the very end in div1C.
 » 19 months ago, # |   +102 lighthearted meme
 » 19 months ago, # |   +1 Eagerly Waiting
 » 19 months ago, # |   +14 CHAD YouKn0wWho
 » 19 months ago, # |   +1 Hello everyone. Good luck to everyone on the contest and a good rating!
 » 19 months ago, # |   -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
 » 19 months ago, # |   +1 ♥ ♥ ♥
 » 19 months ago, # |   +1 osthir vai <3
 » 19 months ago, # |   +1 Positivity Everywhere!!!
 » 19 months ago, # |   +102 This is the first time cheaters will actually do something good to this community lol
 » 19 months ago, # |   +134 but what happens if someone leaks div2F and 1000 people copy it
•  » » 19 months ago, # ^ |   +74 the good deeds meme
•  » » 19 months ago, # ^ |   +18 Their excuse would be "I just want to help and give back to the community, so we did this for a good cause so please forgive us Mr. Mike"
 » 19 months ago, # |   +3 Masha Allah
 » 19 months ago, # | ← Rev. 3 →   +1 Last contest by YouKn0wWho, I gained 125 points. To date, it was my best contest ever. Update: Candidate Master this time
•  » » 19 months ago, # ^ |   0 Congrats on CM!
 » 19 months ago, # |   +287 Should we be concerned that the author has a monetary incentive to make weak pretests?
•  » » 19 months ago, # ^ |   -66 Nah I think we should be more concerned that your rule might be coming to an end.
•  » » 19 months ago, # ^ |   +36 I guess if he had any monetary incentives, he would prefer not to introduce a donation system at all
•  » » » 19 months ago, # ^ |   +4 That's not fair. The donation system is the political move that dethroned 1-gon!
•  » » 19 months ago, # ^ |   0 No
•  » » 19 months ago, # ^ |   +3 Should we be concerned my words have come true?
•  » » » 19 months ago, # ^ |   +38 Yes, we should be celebrating the new ruler.
•  » » » » 19 months ago, # ^ |   +3 I honestly can't tell if you are being humble or trying to get upvotes. Let's stick with the former.
 » 19 months ago, # |   0 Thanks for the generosity and look forward to this round!
 » 19 months ago, # |   0 Hope I can donate more than 0.02 in this round :D
 » 19 months ago, # | ← Rev. 2 →   +4 I hope this will be super exciting contest like here
 » 19 months ago, # |   +9 YouKn0wIt
 » 19 months ago, # | ← Rev. 4 →   +4 Deleted
•  » » 19 months ago, # ^ | ← Rev. 2 →   +17 False, IIT BHU had previous div1 rounds
•  » » » 19 months ago, # ^ |   0 Ashishgup is not the authors of the round you mentioned
•  » » » » 19 months ago, # ^ |   +2 yup sadly he dont but in the upcoming days he will have :) , anyways still false manthan by IIT Bhu was div1 rated in past.
 » 19 months ago, # |   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.
 » 19 months ago, # |   0 Poor-force will help me come to master this time
 » 19 months ago, # |   -27 Monogon are you scared of YouKn0wWho??
 » 19 months ago, # | ← Rev. 2 →   +2 অপেক্ষায় আছি, ভাই।
 » 19 months ago, # |   0 Second time participated in your round! Love it.
 » 19 months ago, # |   +7 YouKn0wWho is one of the best setters I know in Bangladesh.
 » 19 months ago, # |   +1 Again 1k+ upvote Sohag brother ........ <3 Keep aheadHopefully #752 will be interesting
•  » » 19 months ago, # ^ |   +1 Yes
 » 19 months ago, # |   +1 Good luck too all :)
 » 19 months ago, # | ← Rev. 2 →   -16 ignore if you don't like memes
•  » » 19 months ago, # ^ |   +3 You mean upvote more? coz u shdn't participate with multiple accounts.
•  » » » 19 months ago, # ^ |   +3 Good point
•  » » » 19 months ago, # ^ |   +4 no, I meant Solve one problem multiple times and help the poor. just kidding... I know the rules...
 » 19 months ago, # |   -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!
•  » » 19 months ago, # ^ |   +12 Why downvotes to his comment?
•  » » » 19 months ago, # ^ |   +2 I also don't see anything wrong in the comment.
•  » » » 19 months ago, # ^ |   +72 Maybe because EasonCF's comments are everywhere and people got fed up with them
•  » » » » 19 months ago, # ^ |   +93 Exactly
•  » » » » » 19 months ago, # ^ |   +91 But I don't think this can be the reason to downvote a comment.I think whether to downvote a comment depends to itself but not depends to the author.
•  » » » » » » 19 months ago, # ^ |   +41 It seems like saying stereotyped words to get contribution but not expressing his/her own words.
•  » » » » » » » 19 months ago, # ^ | ← Rev. 3 →   +33 Oh,that should be downvoted
•  » » » » 19 months ago, # ^ |   +63 Appropriate.
 » 19 months ago, # |   +47 Where will you be donating the money to?
 » 19 months ago, # |   +9 Solve problems and help the poor! <3
 » 19 months ago, # | ← Rev. 3 →   +41 As a tester, I recommend the contest to you all. As a contestant upvote the blog, or else ...
 » 19 months ago, # |   +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
 » 19 months ago, # |   +9 Thank you YouKn0wWho for keeping the problem direct and short. And your previous blog is helping a lot. ^_^
 » 19 months ago, # |   +24 Apart from the contest it will be more exciting to see YouKn0wWho as the number one contributor ;D
 » 19 months ago, # |   0 number theory — "I am back too" xD btw great initiative ❤️
 » 19 months ago, # | ← Rev. 2 →   +27 Meme![ ](
 » 19 months ago, # |   +1 "Donation Per AC". Go ahead with great work vai.
 » 19 months ago, # |   +22 Meme: It's close
 » 19 months ago, # |   +129 Upd:Div2B: 0.005 -> 0.006Div2C: 0.005 -> 0.008Div1F: 4 -> 2I hope now the distribution is more consistent with the point values of the problems.
 » 19 months ago, # |   +5 I want to become Grand Master!
•  » » 19 months ago, # ^ |   +30 me too bro
 » 19 months ago, # |   0 Great initiative, you are doing a very good job. Thank you!
 » 19 months ago, # |   +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.
 » 19 months ago, # |   0 it's really good stuff that you are doing with this job, respect!
 » 19 months ago, # |   +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?
 » 19 months ago, # |   0 I want to take part in this contest but tonight, Liverpool — my favourite football cbub have a match wwith Brighton :(((
•  » » 19 months ago, # ^ |   +1 I gave contest on the day pakistan beat india for first time in cricket world cups in 29 years . so deal with it .
•  » » » 19 months ago, # ^ |   0 let me think, I think I can watch the first 30 mins and after that, I join in the contest =)))
 » 19 months ago, # |   +1 অনেকদিন পর আজকে পার্টিসিপেট করবো ভাই :) ভাবতেই ভাল্লাগছে...
 » 19 months ago, # |   0 Looking forward to my first Div 1 round!!
 » 19 months ago, # |   +4 Alhamdulillah.. Great achievement! YouKn0wWho is now top contributor from Bangladesh. Proud of you man!
 » 19 months ago, # |   0 It is good round!!!
 » 19 months ago, # |   +2 Excited for this one as its gonna be my first contest on this platform!! Looking forward to gaining some nyc ratings .....
 » 19 months ago, # |   +1 As a Bangladeshi Participants, proud of you bro
 » 19 months ago, # |   +175 Congrats on becoming the new top contributor! Remember, great power comes with great responsibility.
 » 19 months ago, # | ← Rev. 2 →   +69 If I'll solve E/F and resubmit it 9 more times, will you donate 20 USD?
•  » » 19 months ago, # ^ |   +91 But they have to pass the main tests and sadly CF skips multiple AC submissions for each problem :((
 » 19 months ago, # |   +79 This alone made the contest worthwhile YouKn0wWho
 » 19 months ago, # | ← 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
•  » » 19 months ago, # ^ | ← Rev. 2 →   +1 I also faced same problem :(
•  » » 19 months ago, # ^ |   0 I wish, I also had the same problem. In the last 1 minute, I tried to hack someone's solution and my rank went from 86 to 126.
 » 19 months ago, # |   +4 Very interesting problems! Thanks to creaters of this contest!
•  » » 19 months ago, # ^ |   +9 but very strange problem C and I dont know how my solution pass pretests
 » 19 months ago, # | ← Rev. 2 →   -6 Great problemset, but div2-D was quite easy compared to 2000 rated problems i think.
 » 19 months ago, # |   -24 D was too easy tbh. C made me realize how dumb I am once again. Nice contest tho
•  » » 19 months ago, # ^ |   +43 Was it? I spent over an hour staring at it and couldn't come up with solution xD
•  » » » 19 months ago, # ^ |   +2 I think he is talking about div.2 C and D:)
•  » » » » 19 months ago, # ^ | ← Rev. 2 →   +37 I am pretty sure natofp is talking about Div1B (Div2D) based on his submission time lol.
•  » » 19 months ago, # ^ |   +16 Took me an hour to do it :|
•  » » 19 months ago, # ^ |   +3 What approach did you used for D?
•  » » » 19 months ago, # ^ |   0 Did bruteforce and found the pattern. if(x==y)cout<=y)cout<
•  » » » » 19 months ago, # ^ | ← 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 $by$, $y\mod n=y\geq x$ so it can't be $n\mod x$.
•  » » » 19 months ago, # ^ |   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
•  » » 19 months ago, # ^ |   0 Maybe I just happened to figure out the pattern
 » 19 months ago, # | ← 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!
•  » » 19 months ago, # ^ |   +3 WOWW.. You might not know it, But man you are a hero.
 » 19 months ago, # |   +43 Countforces Round #752
 » 19 months ago, # |   0 Problem 1604C - Di-visible Confusion is logical problem ...... I didn't solve this.
•  » » 19 months ago, # ^ |   -22 Did bruteforce and found the pattern. if(x==y)cout<=y)cout<
 » 19 months ago, # | ← 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
 » 19 months ago, # |   +10 Why a lot of solves for D div2 -__- ?
•  » » 19 months ago, # ^ |   0 D is a one liner solution which is perfect for cheating
 » 19 months ago, # |   +5 Why do I think $O(n\sqrt n\log n)$ can pass 1e5 in 4s？
•  » » 19 months ago, # ^ |   +16 It can pass. But set runs too slow that I have to replace it with array+sort :(
•  » » 19 months ago, # ^ | ← Rev. 3 →   +5 Actually $\log n$ is unnecessaryWe Only need $O( n \sqrt{n})$ (Assume $n = \max a_i$)
•  » » » 19 months ago, # ^ |   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.
 » 19 months ago, # |   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 .
 » 19 months ago, # |   +1 How to solve C?
•  » » 19 months ago, # ^ |   -15 Let me know if you find out about approach for C. Managed to solve div2 D but couldn't solve C :(
•  » » » 19 months ago, # ^ | ← Rev. 2 →   0 you can iterate over array and count number of items that mod(i+1)!=0moreover at each step you should include items that mod(i+1-1..current_count)!=0if at some step you found items that mod(i+1-1..current_count)==0 then answer is NO otherwise YES
•  » » 19 months ago, # ^ | ← 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 fitThis 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)
 » 19 months ago, # |   0 The problems were very interesting. I felt dumb after getting the idea of every solution I could xD
 » 19 months ago, # |   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?
•  » » 19 months ago, # ^ |   0 I think it should be least common multiple, i.e, it shouldn't be 2 * 3 * 4 == 24. It should be the LCM of 2, 3, 4 which is 12.
•  » » 19 months ago, # ^ |   0 you should check lcm not product.
 » 19 months ago, # |   +76 $q$-binomial? Are you serious?
•  » » 19 months ago, # ^ |   -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.
 » 19 months ago, # |   0 I got the idea of Div2D 10 minutes after the contest. I hate my life
 » 19 months ago, # |   -11 How to solve div2 C? Managed to solve div2 D but blundered in C :|
 » 19 months ago, # |   +16 Nice contest. But lots of maths (:
 » 19 months ago, # | ← 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
•  » » 19 months ago, # ^ |   -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<=y)cout<
 » 19 months ago, # |   0 How to solve D ?
•  » » 19 months ago, # ^ |   -10 Did bruteforce and found the pattern. `if(x==y)cout<=y)cout<
•  » » 19 months ago, # ^ |   0 i think:if(x==y) ans=x if(x>y) ans=x+y if(x
•  » » 19 months ago, # ^ | ← Rev. 2 →   0 if y < x then u can choose any n larger the y so that n % x = y holdsotherwise 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.
 » 19 months ago, # |   +15 I think this time orzdevinwang will become LGM finally!And is he the youngest LGM in codeforces?
•  » » 19 months ago, # ^ |   0 How old is he? less than 16?
•  » » » 19 months ago, # ^ |   +8 less than 14
 » 19 months ago, # |   +10 Can someone give some hints to div1 E . I only have a naive $O(n^6)$ solution .
•  » » 19 months ago, # ^ |   +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.
•  » » » 19 months ago, # ^ |   +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 .
•  » » » » 19 months ago, # ^ | ← 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.
•  » » » 19 months ago, # ^ |   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?
 » 19 months ago, # | ← 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).
 » 19 months ago, # |   0 Is it possible to do problem C in n^2.
•  » » 19 months ago, # ^ |   0 TLE
 » 19 months ago, # |   -8 Dear YouKn0wWho Your contets are very difficult for me T_T
•  » » 19 months ago, # ^ |   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.
 » 19 months ago, # |   +10 What approaches were supposed to fit into TL and ML in Div1C by the author, and which were not supposed?
 » 19 months ago, # |   +47 Yes Math is totally 100% Competitive Programming
•  » » 19 months ago, # ^ |   +2 lol. The final pattern was a simple 3 line code.
•  » » 19 months ago, # ^ |   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?
 » 19 months ago, # |   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?
•  » » 19 months ago, # ^ |   0 it will first convert int to long long before comparison, so, yes
 » 19 months ago, # |   +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.
•  » » 19 months ago, # ^ | ← 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)$).
•  » » » 19 months ago, # ^ |   +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).
•  » » » » 19 months ago, # ^ |   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...
 » 19 months ago, # |   -10 in the problem Div2D, why x < y : cout<< y-(y%x)/2<<"\n" ?
•  » » 19 months ago, # ^ |   -25 If you bruteforce for the values of x and y, it was following a pattern.
•  » » 19 months ago, # ^ |   -18 Can someone prove it with math?
•  » » » 19 months ago, # ^ |   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)/2y % N will be y — N (Since 2*N > y)y % N => (y — K*x)/2
•  » » 19 months ago, # ^ |   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.
 » 19 months ago, # |   -7 Nothing is better than doing charity while having an interesting competition!
 » 19 months ago, # |   +89 Unpopular opinion: Div2 was only observation and math, no programming. Boring experience.
•  » » 19 months ago, # ^ |   -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.
•  » » » 19 months ago, # ^ |   -15 No, but I expected more data structures, algorithm concepts such as binary search.
•  » » » 19 months ago, # ^ |   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.
 » 19 months ago, # | ← Rev. 2 →   -12 Does the writer have fetish with XOR? Why so many XOR problems from the same writers?
 » 19 months ago, # |   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...
•  » » 19 months ago, # ^ |   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.
•  » » » 19 months ago, # ^ |   0 Yeah I realized that in the meantime. Stupid of me, what can I say. Thanks for explaining anyway!
•  » » 19 months ago, # ^ |   0 You don't need to check for all the n elements, just for the first 21 elements.
 » 19 months ago, # | ← Rev. 2 →   -33 .
•  » » 19 months ago, # ^ |   0 I just went ahead and downvoted you for saying that. Thank you
 » 19 months ago, # |   0 Just solved Div2 D just 8 sec before the Contest Ends, Love my Life and codeforces
 » 19 months ago, # |   +6 It was a math contest, didn't even need computer.
 » 19 months ago, # |   +19 There were so many $69$'s. YouKn0wWho surely loves $69$.
 » 19 months ago, # |   +1 I want to know the name of the man who ranked 2 during the contest and suddently dissappear after system test .-.
 » 19 months ago, # |   +3 anyone calculated the final donation amount?
•  » » 19 months ago, # ^ |   +4 is this contest unrated?
•  » » » 19 months ago, # ^ |   0 it is rated ..y did u suspect that this is unrated?
 » 19 months ago, # | ← 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.
 » 19 months ago, # |   +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)
 » 19 months ago, # |   +13 Great contest I enjoyed solving the questions and also happy for donating.
 » 19 months ago, # | ← 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? memeP.S. use clog instead of cerr
 » 19 months ago, # |   +8 The contest was good, though i think it was a bit mathematically. thanks the writers
 » 19 months ago, # |   +46 Does anyone know why Itst_boyfriend was removed from the contest?
 » 19 months ago, # |   0 When will ratings update?
 » 19 months ago, # |   0 Can any one make me clear how the O(N²) solution is getting ac in div 2 question C???
•  » » 19 months ago, # ^ |   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
 » 19 months ago, # |   +2 This guy never disappoints. ❤
 » 19 months ago, # | ← Rev. 2 →   -24 I mistake
 » 19 months ago, # |   +35 you know it's a bad contest when problem D has O(1) solution
 » 19 months ago, # |   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?
 » 19 months ago, # | ← 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...
 » 19 months ago, # |   +1 I am amazed at how accurate your estimation is!!
 » 19 months ago, # |   -8 As a tester, hope you got nice rating
•  » » 19 months ago, # ^ |   0 wrong place
 » 13 months ago, # |   +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!
 » 11 months ago, # |   0 I found problem C challenging, although I'm late still it's a great contest