### Ashishgup's blog

By Ashishgup, 14 months ago,

Hi everyone!

I would like to invite you to another one of our rounds, that I set with my friends FastestFinger, smartnj, the_hyp0cr1t3 and ridbit10.

The round Codeforces Round #651 (Div. 2) will take place on Jun/20/2020 17:35 (Moscow time). If your rating is less than 2100, this round will be rated for you; otherwise, you can participate out of competition.

I would really like to thank my co-setters and:

Based on past reviews, we have:

• Tried to make A easier and make the difficulty gradient a bit better
• Reduced the number of AdHoc problems and made the problemset more diverse

You will be given 6 problems and 2 hours 15 minutes to solve them.

Good luck! :D

The scoring distribution will be: $500 - 1000 - 1500 - 2000 - 2500 - (2000 + 1250)$

Upd: Quick editorial — Hope you guys found the problems interesting :D

• +1654

 » 14 months ago, # |   +135 Be ready for an interesting round :).
•  » » 14 months ago, # ^ |   -49 All questions on maths and num theory. Questions not spread on different topics. Not an interesting round, sadly.
•  » » » 14 months ago, # ^ |   0 Ashishgup & maths OP
•  » » » 14 months ago, # ^ |   +26 Only first two problems were math, but not the rest, i was also annoyed to see two consecutive GCD related problems.
•  » » » » 14 months ago, # ^ |   +57 I won't call even A and B math. Yes they use a math concept (which every problem on CF does lol).
•  » » » » » 12 months ago, # ^ |   0 every problem ??? seriously
•  » » » 14 months ago, # ^ | ← Rev. 2 →   +14 Only A and B its math and num theory.I would even say that A is more about logic. B — the simplest math at the elementary school level. even + even = even, odd + odd = even, even + odd = odd. C — a little connected with math, but you can exit by simple programming, solving the problem in sqrt(N)*log(N). D, E and F — not math. In addition, 95% of codeforces problems are somehow related to math
•  » » » 14 months ago, # ^ |   0 But the problems were good
•  » » 14 months ago, # ^ |   0 whenever i see Ashishgup round is coming , i start practicing good questions and prepare myself for this contest
•  » » 14 months ago, # ^ |   0 Now we are waiting for your round to be interested. :D
•  » » » 14 months ago, # ^ |   +3 I hope it to not to be a let down.
 » 14 months ago, # |   +37 Ashishgupforces, niceforces, hopefullynogreedyforces
•  » » 14 months ago, # ^ | ← Rev. 2 →   -29 !(MATHFORCES)
•  » » » 14 months ago, # ^ |   0 No, you wrong. A — logic and a some math. B — elementary school math: even+even ==even, odd+odd=even even + odd = odd. C — you can solve this task without math — only programming(for example complexity sqrt(N)*log(N)). D — binary search or DP. E and F1 F2 — no math
 » 14 months ago, # | ← Rev. 2 →   -41 Hoping to haffun :p
 » 14 months ago, # | ← Rev. 3 →   -33 Ashishgup problem-set are so much interesting every-time. Hope we enjoy and learn so much from this one too .UPD: A,B both gcd related (slightly boring) but overall i think a good contest..
•  » » 14 months ago, # ^ | ← Rev. 3 →   -41 Dislike . Seriously man — why . aren't you enjoy or learn Ashishgup contest ?edit: I failed but enjoy and learn so much (:
•  » » 14 months ago, # ^ |   +21 Someone: "interesting contest, good luck"Codeforces Audience: DISLIKE
•  » » » 14 months ago, # ^ |   -6 If he/she is higher rated(more than CM) then,,Codeforces Audience: LIKE-LIKE-LIKE (:
 » 14 months ago, # |   +18 I hope we are not stuck on A and B for eternity this time.
 » 14 months ago, # |   +696
•  » » 14 months ago, # ^ | ← Rev. 4 →   +99 Now, it has become really difficult to make good memes. There is so much competition on Codeforces.
•  » » » 14 months ago, # ^ |   -12 it's really sad..
•  » » 14 months ago, # ^ |   0 current post with the most likes and good meme
•  » » » 14 months ago, # ^ |   -16 cause he is tester and high rated(CM) :v
 » 14 months ago, # |   +44 All of my AshishGup rounds have gone really bad (0 problems and 1 problem solved), but THIS time, REDEMPTION time. Gl to everyone who has also suffered till now like me. :D
•  » » 14 months ago, # ^ |   0 Good luck, good code ;)
•  » » » 14 months ago, # ^ |   0 thanks, good luck to you too.
 » 14 months ago, # |   +190 genius problems with short statements! As a tester, I recommend you to participate.
•  » » 14 months ago, # ^ | ← Rev. 2 →   -29 .
•  » » 14 months ago, # ^ | ← Rev. 2 →   -24 They were.
 » 14 months ago, # | ← Rev. 2 →   +16 I'm ready for atleast 2 penalties in problem A Edit : I didn't notice this, my bad Based on past reviews, we have: Tried to make A easier and make the difficulty gradient a bit better
•  » » 14 months ago, # ^ |   0 What eventually happened — more people successfully solved B than A.
 » 14 months ago, # |   -40 As far i saw in Indian round, for cyan or green, problem statements are very clear but finding solutions feels too much confusing and interesting too. Hope for another interesting and exciting contest...
 » 14 months ago, # |   +52 Another interactive problem by FastestFinger?
 » 14 months ago, # |   -30 Every round of Ashishgup has been penaltyforces for me ![ ](from Imgflip Meme Generator)
 » 14 months ago, # |   +124 Ashishgup contest exist !! Everytime -_-
•  » » 14 months ago, # ^ |   0 Couldn't agree more :)
•  » » 14 months ago, # ^ |   +6 but you are Messi you can do it!
•  » » 14 months ago, # ^ |   +27 You're goddamn rigth
 » 14 months ago, # |   -16 Ah shit, here we go again
 » 14 months ago, # |   -20 Ashishgup round! I am super excited!!!!! Hopefully I'll at least solve A this time :D
•  » » 14 months ago, # ^ |   +2 Me too atleast for A
 » 14 months ago, # |   +12 Having tested some of the problems, I can confirm that they are very interesting and all the statements are quite short! If you participate, you are likely to enjoy the problem-set, as I did!
 » 14 months ago, # |   +73 Weekend=Ashishgup Round
•  » » 14 months ago, # ^ | ← Rev. 2 →   0 So that I can later cry over WA on pretest 2.
•  » » » 14 months ago, # ^ |   -9 *try over WA on pretest 2.
 » 14 months ago, # |   +12 The frequency of Ashishgup round is increasing exponentially :P btw, i enjoyed his previous two rounds.
 » 14 months ago, # |   +6 An army of testers!!
 » 14 months ago, # |   0 Another one ! Excited btw.
 » 14 months ago, # |   -9 I'm all geared up to see "Wrong answer on pretest 2" on A.
 » 14 months ago, # |   +3 Here before AshishGup becomes the top contributor on Codeforces! XD
 » 14 months ago, # |   +24 FastestFinger is ready to provide the fastest editorial (after the contest) :)
•  » » 14 months ago, # ^ |   +7 Maybe before the contest.
 » 14 months ago, # |   +10 I gave one Ashish round before and it boosted my ratings. Hopefully, this will too.
 » 14 months ago, # |   +103 Announcement writer panel of codeforces:Educational rounds: awoo Division 3: vovuh Division 2: Ashishgup
•  » » 14 months ago, # ^ |   +61 Just Like Educational Rounds : awooMikeMirzayanov should start -Informational Rounds ( or SureToFailPretestOnce Rounds) : Ashishgup
 » 14 months ago, # |   +45 This is the third round by almost same set of authors within less than a month, so I am curious; is the long contest approval queue issue fixed, or the contests of popular authors (i.e. those known to make a quality problemset) are processed out of queue?
•  » » 14 months ago, # ^ | ← Rev. 2 →   +2 One of the reasons could be that these authors being experienced, require lesser iterations to get their problems/contests approved?Also, knowing FastestFinger personally, he recently switched jobs and got a little bit of free time in between and as a result he could focus more on creating problems. He had a few ideas in mind for long just didn't have the time, similarly, I guess Ashish is in his final year at university, and due to Corona, the academics have been paused so probably he also is able to dedicate time to designing quality problems. I believe something similar should be the case with other authors too.
•  » » » 14 months ago, # ^ |   +26 Sure, the round coordinators may have found all the problems submitted to be of good quality.But for that round coordinators need to view the submitted problems. Until an year ago at least, it would basically take forever (months!) for your contest proposal to be even viewed, because coordinators were overburdened with proposals. That's what I was asking about. Do contest proposals now take less time to be reviewed now? Or are authors who have prior experience setting good contests given priority?
•  » » » » 14 months ago, # ^ |   +3 Oh! I thought you're talking about the delay post the first approval. My bad!
•  » » » » 14 months ago, # ^ |   +27 I've proposed a contest 7 weeks ago, no answer.
•  » » » » » 14 months ago, # ^ |   0 That answers it then, the queue situation hasn't improved much, if at all.
 » 14 months ago, # |   -11 Wrong answer on pretest2
•  » » 14 months ago, # ^ |   +1 i see AC.
•  » » » 14 months ago, # ^ |   0 Nice :)
•  » » 14 months ago, # ^ |   +8 Better!! I see hacked :P xD xD
 » 14 months ago, # |   0 Gear up guys, going to be an awesome round ahead.
 » 14 months ago, # | ← Rev. 5 →   -47 Deleted
 » 14 months ago, # |   -73 Yet another Indian contest!!!
 » 14 months ago, # |   +14 what are ad hoc problems ?
•  » » 14 months ago, # ^ |   +19 These are problems for which there exists no general technique or algorithm, i.e. no well-studied solution. Each ad-hoc problem is unique, and requires a specialized approach.
•  » » » 14 months ago, # ^ |   0 Are constructive and adhoc similar to each other?
•  » » » » 14 months ago, # ^ |   +9 All constructive is ad-hoc but not all ad-hoc is constructive
 » 14 months ago, # |   -45 Whaaat?? Now you are telling here you reduced the number of adhoc problems, in next contest announcement, someone would say there would be a dp problem, then after sometimes, maybe we would eventually end up to see some setter say C would be binary search, D would be dp, E would be dfs and so on.Please, don't give spoilers.
•  » » 14 months ago, # ^ |   +21 Wtf!? Spoil? Which part is the spoil part? When you see a problem you can recognize which problem is adhoc and wich one is not. And it doesnt realy matter in the solution.
•  » » 14 months ago, # ^ |   +5 I think you are right. Any insight comment about problems of upcoming contest is to much. It is like little boys want to be important: "I know something you don't know, haha".This is espcially true for testers comments, but also true for problemsetters. Why not talk after the contest about it?
 » 14 months ago, # |   0 Ashishgup authored 6 contests and already number 5 in the top contributors list. That shows the quality of the rounds.
•  » » 14 months ago, # ^ |   +49 already number 5 in the top contributors list mostly because of the presence of the large Indian community. But, of course, there's no doubt about the quality of the rounds.
•  » » » 14 months ago, # ^ |   -57 Common man why you are bringing any particular country in this CP community.
•  » » 14 months ago, # ^ |   0 quality with popularity **
 » 14 months ago, # | ← Rev. 2 →   -36 Looking forward to some interesting problems!
 » 14 months ago, # |   +3 At this rate In 5 or 6 month of time ashish gup will have more contribution than mike himself
•  » » 14 months ago, # ^ | ← Rev. 2 →   +18 Do you have any idea of how many upvotes MikeMirzayanov has ? Mike has around 150000 more upvotes than Ashish does.
•  » » » 14 months ago, # ^ |   +3 sorry i didn't know that.but ashish's contribution is around 150 and mike's contribution is around 350 so i thought that ashish can catch up mike.but sorry i didn't acknowledge that
•  » » » 14 months ago, # ^ | ← Rev. 2 →   +8 Bruh wtf. This website says I published 7 blogs but the fact is I published 4 blogs and rest 3 are drafts. They weren't supposed to be accessed by anyone else.
•  » » » » 14 months ago, # ^ |   +14 Even the api call shows only 4 blogs..https://codeforces.com/api/user.blogEntries?handle=aryanc403I wonder what kinda black magic Igorjan94 used to get this top secret info !
•  » » » » » 14 months ago, # ^ | ← Rev. 2 →   +12 aryanc403No magic. If blog was published for more than about 10 minutes (formally: blogId was in recent actions once a 10 minutes and was accessible some minutes later after it), site crawls it in my DB. All requests I make to official CF API (I've parsed html three years ago). If blog or comment is deleted/removed/banned/something else, I don't delete it from my DB, it remains there "forever"Edited: I did strict search for abused usernames: use quotes https://igorjan94.konekon.ru/index/users?username="MikeMirzayanov";"Ashishgup"
•  » » » » » » 14 months ago, # ^ | ← Rev. 4 →   +7 I looked at https://igorjan94.konekon.ru/index/blogs?username=aryanc403I found 7 blogs. None of them includes those 3 draft blogs which I never published. There are 3 other inaccessible blog links in your DB and I remember accidentally publishing them once.
•  » » » 14 months ago, # ^ |   +3 I was master and I thought the contest won't affect my rating but I have no idea why my rating is reduced and I became candidate master!
•  » » » » 14 months ago, # ^ |   0 You had registered for the contest before you became master i guess.
•  » » » » 14 months ago, # ^ |   0 There have been other such cases in past where Experts were rated in Div 3. Because they had registered for the contest when they were Specialist.
•  » » » » » 14 months ago, # ^ |   0 Is there any possibility that they fix it?
•  » » » » » » 14 months ago, # ^ |   +5
 » 14 months ago, # | ← Rev. 5 →   -21 Deleted
 » 14 months ago, # |   +12 Ashishgup!! One of the finest problem-setters.Hope I'll solve till B this time :D
 » 14 months ago, # | ← Rev. 3 →   -16 Has MikeMirzayanov already made aryanc403 coordinator of codeforces??..For those who don't get itPS : Although it's not daily, atleast it's weekly..
 » 14 months ago, # |   -94 The round seems to be unfriendly to Chinese participants. And when will tutorial be published?
•  » » 14 months ago, # ^ |   +52 Codeforces is not the India-China border. So,Don't Spread negativity everywhere.
•  » » 14 months ago, # ^ |   +7 It's not a political site. So, Be Positive.
 » 14 months ago, # |   +152
•  » » 14 months ago, # ^ |   +67 Sorry If I hurt your feelings .But to be honest, Atcoder GC is not for Div2 people :(
•  » » » 14 months ago, # ^ |   +19 It may be difficult but still we can attend it. AFAIK Quality of the questions is really good.
•  » » 14 months ago, # ^ |   0 its like relay contest
 » 14 months ago, # |   0 Maybe this time it will succeed
 » 14 months ago, # |   0 Thanks to everyone commenting about it, I am starting noticing that there is a pattern to every Problem Setter, some tend to use bits too much and others are good in questions with edge cases.The last time I participated in @Ashishgup's #646 I was able to solve B but couldn't do A and C, which proves a lot of the comments down below :P
 » 14 months ago, # |   0 At least now I would be able to solve "A" problem
 » 14 months ago, # |   -14 Ashishgup rounds have been good to me, hopefully that continues :)
 » 14 months ago, # |   0 I want to share something which got into my head suddenly..as.. "More time you spend on paper and pen...less time you need to debug". How many of you agree to this...I liked it very much so thought to share with you guys..if you apply this it can be very helpful.
•  » » 14 months ago, # ^ |   +24 More time you spend on debugging, less time you need to spend on paper and pen.
•  » » » 14 months ago, # ^ |   0 But while contests it can be very risky because there are penalties for wrong answers...so you may loose points...
•  » » 14 months ago, # ^ |   +14 Thats correct i always do that! But thinking to implementing some problem when it solved is very important too. Just put 5 min to think about the implementation and then start coding it will be great and your wrong submission will be decreased :)
•  » » 14 months ago, # ^ |   0 And here I rarely use a paper and pen while giving contests
 » 14 months ago, # |   0 Looking forward to solve atleast 2 questions in less time. In previous Ashish Gupta rounds, I struggled a lot to solve question 1. Who's with me?
 » 14 months ago, # |   +21 People need to understand They are not getting a rating update for making memes !
 » 14 months ago, # | ← Rev. 3 →   -17 none of them like my comment so i delete it
 » 14 months ago, # | ← Rev. 3 →   +29 A wasn't hard — it just required reading skills. When you are rushing through A and B it's very easy to misread the task and fall into trap of initial misunderstanding. It happened to me during your last round with A (where I read that we can't use adjacent cells, not the whole row or column) and during Global Round 8 with B (where I read that you should get the exact value of k, not >= k).These are small mistakes, which can make the task way harder. You don't know how to solve it, at the same time, you see that a lot of people can, you get confused, you don't know what's going on — it also impacts your perception of the subsequent tasks (if A or B is that hard, how hard the next tasks could be?), blocks your thinking, raises your stress level and the whole contest is ruined and your rating goes down big.Because of this, I prefer div 1 rounds (at which I can't currently participate) or TopCoder — where you have a smaller number of harder tasks and there is no need to rush. Nevertheless, I still think that the coder should know how to read the task, so I will keep trying.
•  » » 14 months ago, # ^ |   +6 No matter how many times i make the mistake, i continue doing the wrong thing. :(
 » 14 months ago, # |   0 Entering for the first hope to have fun and atleast clear first two rounds
 » 14 months ago, # |   +27 It's raining contests on codeforces.4 contests within a span of 10 days.
•  » » 14 months ago, # ^ |   0 i wish there was a div3 between the educational-90 and div2-#653
 » 14 months ago, # | ← Rev. 2 →   0 Ashishgup again?
 » 14 months ago, # |   +11 relevant memes in editorial is the coolest part
 » 14 months ago, # |   +9 Ashishgup orz!!!
 » 14 months ago, # |   -46
 » 14 months ago, # |   -18 Penalty Master Ashishgup -_-
 » 14 months ago, # |   0 Hope won't fall in pupil again.
•  » » 14 months ago, # ^ |   -16 It's Ashishgup bro...Anything can Happen...
 » 14 months ago, # |   0 nyo me adhoc problems :(
 » 14 months ago, # |   +103 Ratings in Ashishgup 's round
 » 14 months ago, # |   0 This is going to be exciting
 » 14 months ago, # |   -7 Previous contests from Ashishgup here
•  » » 14 months ago, # ^ |   +4 reasoned dislikes, I understand, let's get more dislikes: D
 » 14 months ago, # |   +19 Personally, I love Ashishgup's round. Because his statement was short and clear.
 » 14 months ago, # |   +20 contest created by Ashishgup are really exiciting
 » 14 months ago, # |   +24 Again, we have 4 div2 contests in a row without any div1..
 » 14 months ago, # | ← Rev. 2 →   +52
•  » » 14 months ago, # ^ |   0 This is a really awesome comment! I don't understand why there aren't more upvotes on this. Maximum appreciation byte__mee!
•  » » » 14 months ago, # ^ |   0 Thanks mate.
 » 14 months ago, # |   0 Cam someone please explain the meaning of ad hoc problem?
•  » » 14 months ago, # ^ |   0 Please read upper comment (:
•  » » 14 months ago, # ^ |   +1 It's Basically Like Building Up A Soln For A Particular Problem as In It would Work Only For That One Problem unlike Greedy And Dp. More or less it's Like Constructive Algo.
 » 14 months ago, # |   -48
•  » » 14 months ago, # ^ |   0 So sad:(
 » 14 months ago, # |   +1 Will there be an Interactive problem?
•  » » 14 months ago, # ^ |   0 Yes
 » 14 months ago, # |   -11 Ok, road to -100 сontribution
 » 14 months ago, # |   +30
 » 14 months ago, # |   +4 I think the next contest is vovuh's div.3 looking forward to it!
 » 14 months ago, # |   +7 Is it a rule to have authors as characters in problems in all Indian contests?
•  » » 14 months ago, # ^ |   0 It's a little bit of obsession with the name.
•  » » 14 months ago, # ^ |   +7 Isn't that fun?
•  » » » 14 months ago, # ^ |   +1 Well, it's better to use a name that exists in real life than an imaginary name.
•  » » » 14 months ago, # ^ |   +3 Is not at all, is harder to type those names instead of the usual "Bob" and "Alice".
•  » » » » 14 months ago, # ^ |   +1 Who said you to type it everytime.. You could have just copied the two names in local string variable and printed that instead.. It would have even easier than your Bob and Alice..
•  » » » » » 14 months ago, # ^ |   -12 That is what I should have done, but you can see that is in fact a problem if we need to add more lines of code and does not contribute to make the problem any better. I did not type the names not even once time because could not type a name like "Ashishgup" if is not from pure memory.
 » 14 months ago, # |   +29 A easier than previous Ashishgup rounds' AB required observation, comparatively easyC lovely problem, needed more observationD most appreciable problem in the contestI highly appreciate the problem statements. Strong pretests were really an additional advantage. Thanks for such a great contest!!
•  » » 14 months ago, # ^ |   +6 E requires clever thinking, was easier than C and D IMO. But it requires a good mathematical proof. Also most of the users didn't even bother solving E after failing at D.
 » 14 months ago, # |   0 all problems except D are amaaaaaazing
•  » » 14 months ago, # ^ |   +9 Yes, D is insanely amazing.
•  » » » 13 months ago, # ^ |   0 yeah, i meant the same
 » 14 months ago, # |   -37 You should really clarify the word optimal in Ques Cthere are multiple paths and we can't know which one is optimalTo explain clearly there are cases where optimal can mean ASHISH dividing by the greatest Odd divisor first and lose or dividing it in such a way that he will win later onThis should be clarified, i tried multiple answers and none of them pass the pretest 2, not even the simplest ones and not even the complex ones.
•  » » 14 months ago, # ^ |   0 You might wanna give a read to game theory for combinatorial games. It was a question from that. I was also reading it during contest :)(I was able to do it)
•  » » » 14 months ago, # ^ |   0 Your solution fits in very tight. Fingers crossed for you.
•  » » » » 14 months ago, # ^ |   0 I know, I'm so scared. I was looking for a better solution which consumed all my time, so I had to resort to this.
•  » » » » » 14 months ago, # ^ |   0 oh dude you got tle sad.
•  » » » » » » 14 months ago, # ^ |   0 yea :(
•  » » 14 months ago, # ^ |   +17 optimal is simply the one which leads to win. That is common sense I suppose!
•  » » 14 months ago, # ^ |   +3 Optimal is how you play for most favorable income. That mean Ashish will play in a way that he will always win(if he can) and same for the opponent.
•  » » 14 months ago, # ^ |   0 Bro u better delete that comment to avoid downvotes. Just a suggestion.
 » 14 months ago, # | ← Rev. 4 →   -16 I enjoyed problem B.
 » 14 months ago, # |   +8 D is the sexiest problem , great work guys .
•  » » 14 months ago, # ^ |   0 Can you share your approach?
•  » » » 14 months ago, # ^ |   0 Basically you need to focus on making odds or evens as optimal as other will not affect as min is taken. Now they have to be alternate also. Now if you observe, you will find that you could binary search the max of one sequence and after taking the indices of all less than that max, try to assign alternatively and if it's possible, then lower the value. Take care of adjacent indices.
•  » » 14 months ago, # ^ |   0 i couldn't solve it ..but it's dp,right?
•  » » 14 months ago, # ^ |   0 My initial thought is solution is equal to finding a subset with floor(k/2) elements with no consecutive drafts from the array. To solve this I thought (k/2) * n dp array is enough but it seems like it exceeds memory limit.
 » 14 months ago, # |   +6 What is pretest 10 for problem E?
•  » » 14 months ago, # ^ |   +3 I passed, after WA in 10 tc, debugging this: Spoiler10 0000011110 0100001101 
•  » » » 14 months ago, # ^ |   0 Thanks for the help! But unfortunately, my code works for this test case.
•  » » 14 months ago, # ^ |   0 I also got WA on 10th test case.
 » 14 months ago, # | ← Rev. 2 →   +5 Was D dp with binary search? UPD: Solved with Binary search.
•  » » 14 months ago, # ^ |   0 I did it with binary search but was getting WA on pretest 10. I couldn't find the mistake of my code.
•  » » » 14 months ago, # ^ |   0 try 7 61 2 3 1 2 4 1
•  » » » » 14 months ago, # ^ |   0 My code gives 2. Is it true?
•  » » » » » 14 months ago, # ^ |   +1 it's truebut my code use a simpler way to check: int a[N],d[N]; int n,k; int check(int v) { if (a[1]<=v) d[1]=1; else d[1]=0; if (d[1]>=k) return 1; for (int i=2;i=k) return 1; } return 0; } 
•  » » » » » 14 months ago, # ^ | ← Rev. 2 →   0 if k odd, I add a element 0 to front and change k++ n++
•  » » » » » » 14 months ago, # ^ |   0 Thanks you very much, now I understand. I will change my function to yours. Hope it will work.
 » 14 months ago, # |   +15 How to solve D?
•  » » 14 months ago, # ^ |   0 bin search by the answer. It's rather easy to check if a given min-max is achievable
•  » » » 14 months ago, # ^ |   0 How can we check if a given answer is possible?
•  » » » » 14 months ago, # ^ |   0 we try to fit odd positions and we try to fit even positions. In either case we greedily check if there is a subsequence of element < target with gaps in betweeni = begin_i num_to_take = ... while i < end_i and num_to_take > 0: if vs[i] <= max_v: i += 1 num_to_take -= 1 i += 1 return num_to_take == 0
•  » » 14 months ago, # ^ |   0 I'd solve with Binary search For fixed C value: 1. fix even position, add odd position any element, for even positions add <= C. 2. fix odd position: add even position any element, for odd position add <= C.
 » 14 months ago, # |   +25 What is the test case 10 of problem E?
•  » » 14 months ago, # ^ |   0 I passed after WA in 10 debugging this tc: Spoiler10 0000011110 0100001101 
•  » » » 14 months ago, # ^ |   +11 In my code the answer is 2, I think it is correct :/
•  » » » » 14 months ago, # ^ |   +3 Same :/
•  » » » 14 months ago, # ^ |   0 My program gives answer 2 for this test, is this correct ?
•  » » 14 months ago, # ^ |   0 My code was giving wrong output for this one: 17 10100001000001001 00000010011000110 
•  » » » 14 months ago, # ^ |   0 What is the correct result?
•  » » » » 14 months ago, # ^ |   0 $3$
•  » » » » » 14 months ago, # ^ |   0 I think it should be 2
•  » » » » » » 14 months ago, # ^ |   0 No, it is 3
•  » » » » » » 14 months ago, # ^ |   0 What will be those 2 subsequences?
•  » » 14 months ago, # ^ | ← Rev. 2 →   0 I found one case where my code fails. 20 10000100111010011011 11001010100110011100 My output is 3 but the correct is 2.
•  » » » 14 months ago, # ^ |   +1 an easier case to debug: 8 11001100 00110011 
 » 14 months ago, # |   +4 ParityForces !
 » 14 months ago, # |   0 In problem D, the optimal sequence is always a substring?
•  » » 14 months ago, # ^ | ← Rev. 3 →   +6 Nope, consider the following test case for K = 4:3 1 2 2 2 2 2 1An optimal sequence is 3, 1, 2, 1, which is not a substring.
•  » » » 14 months ago, # ^ |   0 Nice, ty.
•  » » 14 months ago, # ^ |   -8 Not necessary n=6,k=3 1 1000 1000 1000 2 3 answer will be 3 by taking 1,2,3
•  » » » 14 months ago, # ^ |   +8 It's better to choose 1000, 2, 3. Answer will be 2
•  » » » » 14 months ago, # ^ |   0 Just make k=4, then it won't be continuous
 » 14 months ago, # |   +29 What was test 10 on problem E?
•  » » 14 months ago, # ^ | ← Rev. 3 →   0 my code fails this:18111011100100100100000100011011011011I think the correct answer for this is 5.
 » 14 months ago, # | ← Rev. 2 →   -10 Since, sum of two even are even as well as sum of two odds are even. So, I took n-1 such pairs such that either at those indices sum of the elements are even i.e I took a pair (even,even) or (odd,odd), actually not the elements, rather their indices. Suppose we place these elements [the sum of those] in b then b will contain all even numbers. So, GCD of all of them will be 2 or any other even number i.e. GCD>1 in all cases. But my code gives WA, can anyone explain why ? Testcase=int(input()) for _ in range(Testcase): n=int(input()) arr=list(map(int,input().split())) odds=[] evens=[] for i in range(2*n): if arr[i]%2==0: evens.append(i+1) else: odds.append(i+1) cnt=1 #print('#',_+1) while(cnt1: a,b=odds.pop(),odds.pop() print(a,b) cnt+=1 if len(evens)>1: a,b=evens.pop(),evens.pop() print(a,b) cnt+=1 
•  » » 14 months ago, # ^ | ← Rev. 2 →   0 elif? You actualy can at exit from loop get $cnt > n$. Let's say $cnt = n - 1$ and both ifs executed. Then you write in output all numbers
•  » » » 14 months ago, # ^ | ← Rev. 2 →   0 Oops, I never looked into that, I am sorry. BTW, Thank You.
•  » » 14 months ago, # ^ | ← Rev. 2 →   0 I also Did the exact same thing which you were doing but i got WA on Test 2 and i don't know where it is failing. At the end,I applied Bruteforce which passed.
 » 14 months ago, # |   -8 I enjoyed the problems. It was a nice contest. I hope for a rating increase.
•  » » 14 months ago, # ^ |   +3 Go to CF-predictor and it tells you your rating change. (Its also a browser extension for chrome:))
•  » » » 14 months ago, # ^ |   +11 Unfortunately CF-Predictor has not shown an accurate result recently. Apparently the point is a change in the rating system.But still shows an almost correct result.
 » 14 months ago, # |   0 I know that strong pretests are generally a good thing, but having 0 hacks in the whole contest seems a bit extreme...
•  » » 13 months ago, # ^ |   0 My B failed in system testing due to a simple case where number of even/odd numbers == 2!
 » 14 months ago, # |   +43 Ashishgup and FastestFinger play a game.Sounds bad
•  » » 14 months ago, # ^ |   -11 If only you are bad.
 » 14 months ago, # |   0 I liked the contest but isn't the gap between C and D too large?
•  » » 14 months ago, # ^ |   +3 D was easier than C for me .
•  » » » 14 months ago, # ^ |   0 It is easy for you if you know dp (in my opinion it is solved through dp). C is the simplest division of a number into divisors. And the number of solved C and D (4700 and 700) suggests that it’s easier to split the number into factors. :D
•  » » » » 14 months ago, # ^ |   +9 i solved it without dp it is easy if you know binary search on the answer
•  » » » » » 14 months ago, # ^ |   +3 Hmm. thank you for idea, but agree, dividing x by y is easier than implementing a binary search by answer :)
 » 14 months ago, # |   -12 It's a quote and not mine, actually my friends' : Pedassag gofti yek rahate, doon rikhti vasamoon ke biaym beshim 11 hezar??? round baadi iranie dige, daram barat
 » 14 months ago, # |   0 Folks, how do I see the pretests failed? I can see only the first OK's on my submit page. Should I just wait till the full test finishes?
•  » » 14 months ago, # ^ |   0 Yeah, wait a little bit, and you will get whatever you want
 » 14 months ago, # |   +3 Best difficulty gradient ever!
 » 14 months ago, # |   +14 i think if i had five min more i could solve D :(((
 » 14 months ago, # |   +10 Loved the contest. Can't thank the setters enough. It was probably the perfect Div 2 I could ever ask for. And the quick editorial as ever. AshishGup and FastestFinger never fail to impress!
 » 14 months ago, # |   0 I really enjoyed problem C not too hard not too easy it's just how it should be
 » 14 months ago, # |   +11 Ashishgup's contests make me realize how much i lack in constructive and how dumb i am :(
•  » » 14 months ago, # ^ |   0 At least you didn't waste 20 min on A XD like how I did I feel so dump
•  » » » 14 months ago, # ^ |   0 i get pretests passed on C,4 min before the contests ends .. and i dont even know if the solution is correct yet!
 » 14 months ago, # | ← Rev. 2 →   -17 My previous post was receiving a lot of downvotes. So I have removed it
•  » » 14 months ago, # ^ |   0 I assume you realized the trouble. You should not share anything "during" the contest. You might want to record and upload it after the contest, just like the grandmasters' screencasts.
•  » » » 13 months ago, # ^ |   0 It was not my video. I posted the link to bring it the notice of the mmoderators so that they can penalize the offender.
•  » » » 13 months ago, # ^ |   0 I am sad to see that my comment has received so many downvotes even though I wanted the admin to take action against the person who had live streamed.
 » 14 months ago, # |   +27 Ashishgup Orz. 3 great contests 3 weeks in a row!
 » 14 months ago, # | ← Rev. 2 →   +2 My screencast of the round (solutions at the end)
 » 14 months ago, # | ← Rev. 2 →   +5 Thanks Ashishgup! Problems were really nice and very interesting! I will wait for your the next round.
 » 14 months ago, # |   +2 My C solution: ideaIf N has at least one odd divisor(>1), dividing by which we get an even number greater than 2 — Ashishgup always wins. Otherwise, FastestFinger wins. We also consider cases where the answer can be given immediately. 1. N is odd and greater than 1 — win Ashishgup (immediately divides the number into itself and gets 1) 2. N=1 — win FastestFinger(Ashishgup just has no moves) 3. N=2 — win Ashishgup (Ashishgup reduces the number by one and FastestFinger has no moves) Why does it work? if you divide N into prime factors (for example 36 = 2 * 2 * 3 * 3) then multiply all the odd divisors and divide N by the resulting divisor — you get a number consisting only of even divisors and the enemy will have to subtract one from this number, which will give us victory(exampe: 36 = 2 * 2 * 3 * 3; 3 * 3 = 9; 36 / 9 = 4. 4 - 1 = 3; You win.code 1: 84456260 code 2#include typedef long long ll; typedef long double ld; typedef unsigned long long ull; #define pb push_back #define pf push_front #define pp pop #define ppb pop_back #define ppf pop_front #define sz(x) x.size() #define mk make_pair #define all(x) x.begin(), x.end() #define fi first #define se second #define max3(x, y, z) max(max(x, y), z) #define min3(x, y, z) min(min(x, y), z) #define forn(x, l, r) for (int x = l; x < r; x++) #define nfor(x, l, r) for (int x = r; x >= l x--) #define fast ios_base::sync_with_stdio(false); cin.tie(nullptr); #define up upper_bound #define lb lower_bound #define tests int t; cin >> t; while (t--) #define afor(x, y) for (auto x : y) #define pii pair #define vi vector #define vll vector #define vc vector #define si set #define sll set #define mii map #define mci map #define mll map const int Z = (int) 1e5 + 123; const int inf = (int) 2e9 + 123; const ll llinf = (ll) 2e18 + 123; const double PI = acos(-1.0); using namespace std; void check(ll n, ll x, bool& flag) { if (x % 2 == 1 && (n / x) % 2 == 0 && (n / x) > 2 && x != 1) flag = true; } int main() { fast; int t; cin >> t; while (t--) { ll n; cin >> n; if (n == 1) { cout << "FastestFinger \n"; continue; } if (n == 2 || n % 2 == 1) { cout << "Ashishgup \n"; continue; } bool flag = false; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { check(n, i, flag); check(n, n / i, flag); if (flag) break; } } cout << (flag ? "Ashishgup \n" : "FastestFinger \n"); }; return 0; } Good Luck
 » 14 months ago, # | ← Rev. 2 →   0 Does anyone know why this gives TLE for B
•  » » 14 months ago, # ^ | ← Rev. 2 →   +3 Testcase1 3 1 1 1 1 1 2 i < e.size() - 2if size of e is 1 then e.size() - 2 overflows and become very large values because e.size() is of type unsigned.i'd suggest to always write it in form i + x < e.size() to avoid such issues or you can typecast it to int like i < (int)e.size() - 2
 » 14 months ago, # |   0
 » 14 months ago, # |   +7 Ashishgup and team really do come up with some interesting problems everytime..Always new things to learn everytime!
•  » » 14 months ago, # ^ |   +8 UPD: Even upsolving is Fun!!
 » 14 months ago, # | ← Rev. 2 →   +7 Nice problemset! really enjoyed! problem E might get more AC if E came before D.
 » 14 months ago, # |   +66 To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove the cheaters, fix wrong division cases and update ratings them again!
•  » » 14 months ago, # ^ |   +1 Thanks for fast update.
•  » » 14 months ago, # ^ |   +6 Hi Mike! Please also update problem ratings fast. It took 2 days to update the problem ratings in the Global Round :( Thanks!
•  » » 13 months ago, # ^ |   +3 Please Mike, why you keep saying you care about cheaters? If that were true you would do something about this https://codeforces.com/blog/entry/75610 for example. And at least add a way to actual report this people. But no problem, keep ingoring users that only want fair contests ...
 » 14 months ago, # |   0 can anybody explain the DP solution for ques D thanks
 » 14 months ago, # | ← Rev. 4 →   -22 I'm getting TLE in this code of E problem . Can anyone help please ? 
•  » » 14 months ago, # ^ |   +5 You know you can provide link to your submission right ?
 » 14 months ago, # |   0 I found E easier than D. D's implementation was little tough so I proceeded to E. Best choice of my Life.
•  » » 14 months ago, # ^ |   0 I actually didn't find the implementation for D difficult. I believe the observation was more difficult to make.
•  » » » 14 months ago, # ^ |   +1 Actually I was thinking another solution which was getting hard to implement. We usually go with the first soln that comes to our mind.
 » 14 months ago, # |   +8 Is there someone else who solved D with DSU?
•  » » 14 months ago, # ^ | ← Rev. 2 →   +16 Ya buddy!! well failed in contest though... Here is the submission 84521452Btw did anyone solve D using dp??
•  » » » 14 months ago, # ^ |   0 can you share your approach
•  » » » » 14 months ago, # ^ |   +16 Ya sure... i used the concept of forming segments of visited indices using dsu.. If the length of a segment is increased to become odd, increment the counter... If the counter>=(k/2) print the value at that index...U may need to take care of some boundary cases if counter ==k/2 :1) valueAt(0) and ValueAt(n-1) can't be in the same segment if (k%2==0). 2) if (k%2) , if 0 is the starting index or n-1 is the ending vertex , counter should be equal to (k+1)/2
 » 14 months ago, # |   +15 I wanna know why Ashishgup left my contest (Code Chronicles 1.0) midway yesterday ? I was so happy to see him solve our questions. Anyways his contest today was beautiful. Thanks to him I became an Expert on CF. I think Ashishgup read my comment on his previous contest. xD
•  » » 14 months ago, # ^ |   +3 I must say, your contest was good. Although I took it casually as it was unrated but still I got a good rank. That's when I realized that being calm is very important during a contest. What you learn from the problems is much more important than your rank. Thanks for the lesson :)
•  » » » 14 months ago, # ^ |   0 Glad you liked the contest! Although it was unrated we had put in lot of efforts to create a good problem set. :)
•  » » » » 14 months ago, # ^ |   0 The problems were actually really good. I hope, we'll get to see more contests from you. :)
 » 14 months ago, # |   0 I am a bit confused. This was my first contest on Codeforces. I got a +396 and I am a newbie now. I thought the minimum ratings were 1500. What is happening?
•  » » 14 months ago, # ^ |   +1 They changed the rules. Now, your rating starts from zero and will stabilize in 5-6 rounds hopefully. It's better because with the previous rules there was a decline in the ratings for almost every new participant and it didn't look good.
•  » » » 14 months ago, # ^ |   0 What exactly do you mean by "stabilize in 5-6 rounds"? Also, if you have the link to the blog post mentioning the change of rules, kindly provide it. Thanks!
•  » » » » 14 months ago, # ^ |   +1 I mean you'll be closer to the ratings you actually deserve. Here is the link to the official blog post.
•  » » » » » 14 months ago, # ^ |   0 Thanks a lot, mate!
•  » » » 14 months ago, # ^ |   0 Wasn't aware of these new rules . Much needed !
 » 14 months ago, # |   +69 Here as the virtual Moss for Codeforces, busting cheaters and getting them out of their bills. I hereby present you another team GStnt and ymkzpx.Congrats to both of them, Experts -> Candidate Master.Solutions :D : 84460179 and 84450653C : 84458183 and 84460019Ashishgup MikeMirzayanov isaf27 I guess these both shouldn't be the part of Div1
•  » » 14 months ago, # ^ |   +4 Ah another account just like me, ain't a noble profession as this :)
•  » » 14 months ago, # ^ |   0 Wow!! How did you catch these cheaters? Kudos!
•  » » » 14 months ago, # ^ |   +8 A magician never reveals his secrets.
•  » » » » 14 months ago, # ^ |   0 A magician can share a part of his secret to catch even more cheaters if that's better for the codeforces community afterall :)
 » 14 months ago, # |   +28 nice contest! I got to yellow. hopefully this is my last rated div2 contest ;)
•  » » 14 months ago, # ^ |   0 All the best Master :)
 » 14 months ago, # |   0 I wasted my whole time in problem C later found that it could also be done by just simulation of the game and memoization.
•  » » 14 months ago, # ^ |   +16 You didn't waste your time ; you worked harder towards solving it .Cheers !
 » 14 months ago, # |   0 Not a good day for me, problem set was nice. A silly mistake in Problem C caused lot of WA's throughout the contest. Following are video solution for people who struggled like me for first 3 problems, Problem A Problem B Problem C
 » 14 months ago, # |   0 hmmm
 » 14 months ago, # | ← Rev. 3 →   0 I have a question about F1. When I check my submissions I see the following test 2: 1 4 2 4 1 2 2 4 4 3 I guess that there should be 3 edges and the last pair are hidden nodes. However, there is a double edge displayed. Is this just an error in a display or an incorrect test or am I missing something?
•  » » 14 months ago, # ^ |   +10 If you read the “hack input” part of the problem statement, you will find actually the first pair are the hidden nodes.
•  » » » 14 months ago, # ^ |   0 Ok, thanks.
 » 14 months ago, # |   +7 Thanks for the round. Especially the prestests were exceptional.
 » 14 months ago, # | ← Rev. 2 →   0 Codeforces Round #651Problem A and BProblem CProblem DProblem E
•  » » 14 months ago, # ^ |   0 Thanks Bro!!
 » 14 months ago, # |   +3 Guys u can refer below link for problem A and B. https://youtu.be/0WYFThVN-GA?sub_confirmation=1Guys u can refer below link for problem C. https://youtu.be/Tgy6lTxBPwk?sub_confirmation=1Guys u can refer below link for problem D. https://youtu.be/s_XIa9sVaF0?sub_confirmation=1Guys u can refer below link for problem E. https://youtu.be/Uirs77-Urp0?sub_confirmation=1
 » 13 months ago, # | ← Rev. 2 →   +13 Hi MikeMirzayanov please see this solution. How this solution passed? I think this is a bug which should be fixed.
•  » » 13 months ago, # ^ |   0 what is the bug
•  » » » 13 months ago, # ^ |   +8 He printed same indices again and again. Like 1 1 2 2 3 3 which can't be the solution.
•  » » 13 months ago, # ^ |   +3 There is definitely something wrong with this submission.
•  » » 13 months ago, # ^ |   +1 I guess the checker must be wrong !!
 » 13 months ago, # |   0 I got this message from Codeforces today. Attention!Your solution 84481546 for the problem 1370C significantly coincides with solutions Aiman11/84481546, mission_thunderbolt/84487119. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.com/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.I used ideone.com to check the code i had written from scratch as my compiler was not working. I was not aware that the code could be copied by anyone from there or there was a public mode. I am really sorry and this mistake will not be repeated in the future. Please do not take any action for a mistake which was unintentional.
•  » » 13 months ago, # ^ | ← Rev. 2 →   +1 For the first mistake you are simply expelled from the contest. After all, not knowing the rules does not exempt from responsibility.And for the future, ideone has secret mode.
•  » » » 13 months ago, # ^ |   0 Thanks for the help!
 » 13 months ago, # |   -6 Hello Ashishgup, I would like to express my views for the first question (A problem). I think the range of n was quite small. It could easily be 10^18 or 10^9. I am saying this because while trying to hack, I saw many users submitting the Brute Force solution or they have copied from GeeksForGeeks, the code of find the maximum GCD pair in the array, for example:84434064. Here you can see that the findMaxGCD function is a copy-paste from the following GFG blog: Find pair maximum GCD array which is the Dirichlet Divisor Problem. Therefore, I saw many people writing the same piece of code instead of using their brains. Had it been 10^9 or 10^18, all these submissions would have been failed. I think A was quite easy as many of the users tried brute force or copy-pasted.
 » 13 months ago, # |   0 Any other person except CM Or MASTER Posts something : Random CF User with 10 submissions : Ohh It's Too hateful let's downvote it I mean whats all the rage abt?!