Ashishgup's blog

By Ashishgup, 4 years 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

| Write comment?
 » 4 years ago, # |   +135 Be ready for an interesting round :).
•  » » 4 years ago, # ^ |   -49 All questions on maths and num theory. Questions not spread on different topics. Not an interesting round, sadly.
•  » » » 4 years ago, # ^ |   +26 Only first two problems were math, but not the rest, i was also annoyed to see two consecutive GCD related problems.
•  » » » » 4 years ago, # ^ |   +57 I won't call even A and B math. Yes they use a math concept (which every problem on CF does lol).
•  » » » 4 years 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
•  » » » 4 years ago, # ^ |   0 But the problems were good
•  » » 4 years ago, # ^ |   0 Now we are waiting for your round to be interested. :D
•  » » » 4 years ago, # ^ |   +3 I hope it to not to be a let down.
 » 4 years ago, # |   +37 Ashishgupforces, niceforces, hopefullynogreedyforces
•  » » 4 years ago, # ^ | ← Rev. 2 →   -29 !(MATHFORCES)
•  » » » 4 years 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
 » 4 years ago, # | ← Rev. 2 →   -41 Hoping to haffun :p
 » 4 years 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..
•  » » 4 years 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 (:
•  » » 4 years ago, # ^ |   +21 Someone: "interesting contest, good luck"Codeforces Audience: DISLIKE
•  » » » 4 years ago, # ^ |   -6 If he/she is higher rated(more than CM) then,,Codeforces Audience: LIKE-LIKE-LIKE (:
 » 4 years ago, # |   +18 I hope we are not stuck on A and B for eternity this time.
 » 4 years ago, # |   +696
•  » » 4 years ago, # ^ | ← Rev. 4 →   +99 Now, it has become really difficult to make good memes. There is so much competition on Codeforces.
•  » » 4 years ago, # ^ |   0 current post with the most likes and good meme
•  » » » 4 years ago, # ^ |   -16 cause he is tester and high rated(CM) :v
 » 4 years 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
•  » » 4 years ago, # ^ |   0 Good luck, good code ;)
•  » » » 4 years ago, # ^ |   0 thanks, good luck to you too.
 » 4 years ago, # |   +190 genius problems with short statements! As a tester, I recommend you to participate.
•  » » 4 years ago, # ^ | ← Rev. 2 →   -29 .
 » 4 years 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
•  » » 4 years ago, # ^ |   0 What eventually happened — more people successfully solved B than A.
 » 4 years ago, # |   +52 Another interactive problem by FastestFinger?
 » 4 years ago, # |   -30 Every round of Ashishgup has been penaltyforces for me ![ ](from Imgflip Meme Generator)
 » 4 years ago, # |   +124 Ashishgup contest exist !! Everytime -_-
•  » » 4 years ago, # ^ |   +6 but you are Messi you can do it!
•  » » 4 years ago, # ^ |   +27 You're goddamn rigth
 » 4 years ago, # |   -16 Ah shit, here we go again
 » 4 years ago, # |   -20 Ashishgup round! I am super excited!!!!! Hopefully I'll at least solve A this time :D
•  » » 4 years ago, # ^ |   +2 Me too atleast for A
 » 4 years 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!
 » 4 years ago, # |   +73 Weekend=Ashishgup Round
•  » » 4 years ago, # ^ | ← Rev. 2 →   0 So that I can later cry over WA on pretest 2.
•  » » » 4 years ago, # ^ |   -9 *try over WA on pretest 2.
 » 4 years ago, # |   +12 The frequency of Ashishgup round is increasing exponentially :P btw, i enjoyed his previous two rounds.
 » 4 years ago, # |   +6 An army of testers!!
 » 4 years ago, # |   0 Another one ! Excited btw.
 » 4 years ago, # |   +3 Here before AshishGup becomes the top contributor on Codeforces! XD
 » 4 years ago, # |   +24 FastestFinger is ready to provide the fastest editorial (after the contest) :)
•  » » 4 years ago, # ^ |   +7 Maybe before the contest.
 » 4 years ago, # |   +10 I gave one Ashish round before and it boosted my ratings. Hopefully, this will too.
 » 4 years ago, # |   +103 Announcement writer panel of codeforces:Educational rounds: awoo Division 3: vovuh Division 2: Ashishgup
•  » » 4 years ago, # ^ |   +61 Just Like Educational Rounds : awooMikeMirzayanov should start -Informational Rounds ( or SureToFailPretestOnce Rounds) : Ashishgup
 » 4 years 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?
•  » » 4 years 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.
•  » » » 4 years 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?
•  » » » » 4 years ago, # ^ |   +3 Oh! I thought you're talking about the delay post the first approval. My bad!
•  » » » » 4 years ago, # ^ |   +27 I've proposed a contest 7 weeks ago, no answer.
•  » » » » » 4 years ago, # ^ |   0 That answers it then, the queue situation hasn't improved much, if at all.
 » 4 years ago, # |   -11 Wrong answer on pretest2
•  » » 4 years ago, # ^ |   +1 i see AC.
•  » » 4 years ago, # ^ |   +8 Better!! I see hacked :P xD xD
 » 4 years ago, # | ← Rev. 5 →   -47 Deleted
 » 4 years ago, # |   -73 Yet another Indian contest!!!
 » 4 years ago, # |   +14 what are ad hoc problems ?
•  » » 4 years 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.
•  » » » 4 years ago, # ^ |   0 Are constructive and adhoc similar to each other?
•  » » » » 4 years ago, # ^ |   +9 All constructive is ad-hoc but not all ad-hoc is constructive
 » 4 years 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.
•  » » 4 years 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.
•  » » 4 years 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?
 » 4 years ago, # |   0 Ashishgup authored 6 contests and already number 5 in the top contributors list. That shows the quality of the rounds.
•  » » 4 years 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.
•  » » 4 years ago, # ^ |   0 quality with popularity **
 » 4 years ago, # | ← Rev. 2 →   -36 Looking forward to some interesting problems!
 » 4 years ago, # |   +3 At this rate In 5 or 6 month of time ashish gup will have more contribution than mike himself
•  » » 4 years ago, # ^ | ← Rev. 2 →   +18 Do you have any idea of how many upvotes MikeMirzayanov has ? Mike has around 150000 more upvotes than Ashish does.
•  » » » 4 years 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
•  » » » 4 years 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.
•  » » » » 4 years 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 !
•  » » » » » 4 years 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"
•  » » » » » » 4 years 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.
•  » » » 4 years 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!
•  » » » » 4 years ago, # ^ |   0 You had registered for the contest before you became master i guess.
•  » » » » 4 years 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.
•  » » » » » 4 years ago, # ^ |   0 Is there any possibility that they fix it?
•  » » » » » » 4 years ago, # ^ |   +5
 » 4 years ago, # | ← Rev. 5 →   -21 Deleted
 » 4 years ago, # |   +12 Ashishgup!! One of the finest problem-setters.Hope I'll solve till B this time :D
 » 4 years 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..
 » 4 years ago, # |   -94 The round seems to be unfriendly to Chinese participants. And when will tutorial be published?
•  » » 4 years ago, # ^ |   +52 Codeforces is not the India-China border. So,Don't Spread negativity everywhere.
•  » » 4 years ago, # ^ |   +7 It's not a political site. So, Be Positive.
 » 4 years ago, # |   +152
•  » » 4 years ago, # ^ |   +67 Sorry If I hurt your feelings .But to be honest, Atcoder GC is not for Div2 people :(
•  » » » 4 years ago, # ^ |   +19 It may be difficult but still we can attend it. AFAIK Quality of the questions is really good.
•  » » 4 years ago, # ^ |   0 its like relay contest
 » 4 years ago, # |   0 Maybe this time it will succeed
 » 4 years 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
 » 4 years ago, # |   0 At least now I would be able to solve "A" problem
 » 4 years ago, # |   -14 Ashishgup rounds have been good to me, hopefully that continues :)
 » 4 years 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.
•  » » 4 years ago, # ^ |   +24 More time you spend on debugging, less time you need to spend on paper and pen.
•  » » » 4 years ago, # ^ |   0 But while contests it can be very risky because there are penalties for wrong answers...so you may loose points...
•  » » 4 years 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 :)
•  » » 4 years ago, # ^ |   0 And here I rarely use a paper and pen while giving contests
 » 4 years 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?
 » 4 years ago, # |   +21 People need to understand They are not getting a rating update for making memes !
 » 4 years ago, # | ← Rev. 3 →   -17 none of them like my comment so i delete it
•  » » 4 years ago, # ^ |   +6 No matter how many times i make the mistake, i continue doing the wrong thing. :(
 » 4 years ago, # |   +27 It's raining contests on codeforces.4 contests within a span of 10 days.
•  » » 4 years ago, # ^ |   0 i wish there was a div3 between the educational-90 and div2-#653
 » 4 years ago, # | ← Rev. 2 →   0 Ashishgup again?
 » 4 years ago, # |   +11 relevant memes in editorial is the coolest part
 » 4 years ago, # |   +9 Ashishgup orz!!!
 » 4 years ago, # |   0 nyo me adhoc problems :(
 » 4 years ago, # |   +103 Ratings in Ashishgup 's round
 » 4 years ago, # |   -7 Previous contests from Ashishgup here
•  » » 4 years ago, # ^ |   +4 reasoned dislikes, I understand, let's get more dislikes: D
 » 4 years ago, # |   +19 Personally, I love Ashishgup's round. Because his statement was short and clear.
 » 4 years ago, # |   +20 contest created by Ashishgup are really exiciting
 » 4 years ago, # |   +24 Again, we have 4 div2 contests in a row without any div1..
 » 4 years ago, # | ← Rev. 2 →   +52
•  » » 4 years ago, # ^ |   0 This is a really awesome comment! I don't understand why there aren't more upvotes on this. Maximum appreciation wsxx!
 » 4 years ago, # |   0 Cam someone please explain the meaning of ad hoc problem?
•  » » 4 years ago, # ^ |   0 Please read upper comment (:
•  » » 4 years 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.
 » 4 years ago, # |   -48
•  » » 4 years ago, # ^ |   0 So sad:(
 » 4 years ago, # |   +1 Will there be an Interactive problem?
•  » » 4 years ago, # ^ |   0 Yes
 » 4 years ago, # |   -11 Ok, road to -100 сontribution
 » 4 years ago, # |   +30
 » 4 years ago, # |   +4 I think the next contest is vovuh's div.3 looking forward to it!
 » 4 years ago, # |   +7 Is it a rule to have authors as characters in problems in all Indian contests?
•  » » 4 years ago, # ^ |   0 It's a little bit of obsession with the name.
•  » » 4 years ago, # ^ |   +7 Isn't that fun?
•  » » » 4 years ago, # ^ |   +1 Well, it's better to use a name that exists in real life than an imaginary name.
•  » » » 4 years ago, # ^ |   +3 Is not at all, is harder to type those names instead of the usual "Bob" and "Alice".
•  » » » » 4 years 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..
•  » » » » » 4 years 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.
 » 4 years 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!!
•  » » 4 years 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.
 » 4 years ago, # |   0 all problems except D are amaaaaaazing
•  » » 4 years ago, # ^ |   +9 Yes, D is insanely amazing.
•  » » » 4 years ago, # ^ |   0 yeah, i meant the same
 » 4 years 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.
•  » » 4 years 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)
•  » » » 4 years ago, # ^ |   0 Your solution fits in very tight. Fingers crossed for you.
•  » » » » 4 years 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.
•  » » » » » 4 years ago, # ^ |   0 oh dude you got tle sad.
•  » » » » » » 4 years ago, # ^ |   0 yea :(
•  » » 4 years ago, # ^ |   +17 optimal is simply the one which leads to win. That is common sense I suppose!
•  » » 4 years 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.
•  » » 4 years ago, # ^ |   0 Bro u better delete that comment to avoid downvotes. Just a suggestion.
 » 4 years ago, # |   +8 D is the sexiest problem , great work guys .
•  » » 4 years ago, # ^ |   0 Can you share your approach?
•  » » » 4 years 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.
•  » » 4 years 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.
 » 4 years ago, # |   +6 What is pretest 10 for problem E?
•  » » 4 years ago, # ^ |   +3 I passed, after WA in 10 tc, debugging this: Spoiler10 0000011110 0100001101 
•  » » » 4 years ago, # ^ |   0 Thanks for the help! But unfortunately, my code works for this test case.
•  » » 4 years ago, # ^ |   0 I also got WA on 10th test case.
 » 4 years ago, # | ← Rev. 2 →   +5 Was D dp with binary search? UPD: Solved with Binary search.
•  » » 4 years ago, # ^ |   0 I did it with binary search but was getting WA on pretest 10. I couldn't find the mistake of my code.
•  » » » 4 years ago, # ^ |   0 try 7 61 2 3 1 2 4 1
•  » » » » 4 years ago, # ^ |   0 My code gives 2. Is it true?
•  » » » » » 4 years 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; } 
•  » » » » » 4 years ago, # ^ | ← Rev. 2 →   0 if k odd, I add a element 0 to front and change k++ n++
 » 4 years ago, # |   +15 How to solve D?
•  » » 4 years ago, # ^ |   0 bin search by the answer. It's rather easy to check if a given min-max is achievable
•  » » » 4 years ago, # ^ |   0 How can we check if a given answer is possible?
•  » » » » 4 years 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
•  » » 4 years 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.
 » 4 years ago, # |   +25 What is the test case 10 of problem E?
•  » » 4 years ago, # ^ |   0 I passed after WA in 10 debugging this tc: Spoiler10 0000011110 0100001101 
•  » » » 4 years ago, # ^ |   +11 In my code the answer is 2, I think it is correct :/
•  » » » » 4 years ago, # ^ |   +3 Same :/
•  » » » 4 years ago, # ^ |   0 My program gives answer 2 for this test, is this correct ?
•  » » 4 years ago, # ^ |   0 My code was giving wrong output for this one: 17 10100001000001001 00000010011000110 
•  » » » 4 years ago, # ^ |   0 What is the correct result?
•  » » » » 4 years ago, # ^ |   0 $3$
•  » » » » » 4 years ago, # ^ |   0 I think it should be 2
•  » » » » » » 4 years ago, # ^ |   0 No, it is 3
•  » » » » » » 4 years ago, # ^ |   0 What will be those 2 subsequences?
•  » » 4 years ago, # ^ | ← Rev. 2 →   0 I found one case where my code fails. 20 10000100111010011011 11001010100110011100 My output is 3 but the correct is 2.
•  » » » 4 years ago, # ^ |   +1 an easier case to debug: 8 11001100 00110011 
 » 4 years ago, # |   +4 ParityForces !
 » 4 years ago, # |   0 In problem D, the optimal sequence is always a substring?
•  » » 4 years 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.
•  » » » 4 years ago, # ^ |   0 Nice, ty.
•  » » 4 years ago, # ^ |   -8 Not necessary n=6,k=3 1 1000 1000 1000 2 3 answer will be 3 by taking 1,2,3
•  » » » 4 years ago, # ^ |   +8 It's better to choose 1000, 2, 3. Answer will be 2
•  » » » » 4 years ago, # ^ |   0 Just make k=4, then it won't be continuous
 » 4 years ago, # |   +29 What was test 10 on problem E?
•  » » 4 years ago, # ^ | ← Rev. 3 →   0 my code fails this:18111011100100100100000100011011011011I think the correct answer for this is 5.
 » 4 years 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 
•  » » 4 years 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
 » 4 years ago, # |   -8 I enjoyed the problems. It was a nice contest. I hope for a rating increase.
•  » » 4 years ago, # ^ |   +3 Go to CF-predictor and it tells you your rating change. (Its also a browser extension for chrome:))
•  » » » 4 years 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.
 » 4 years ago, # |   0 I know that strong pretests are generally a good thing, but having 0 hacks in the whole contest seems a bit extreme...
•  » » 4 years ago, # ^ |   0 My B failed in system testing due to a simple case where number of even/odd numbers == 2!
 » 4 years ago, # |   +43 Ashishgup and FastestFinger play a game.Sounds bad
•  » » 4 years ago, # ^ |   -11 If only you are bad.
 » 4 years ago, # |   0 I liked the contest but isn't the gap between C and D too large?
•  » » 4 years ago, # ^ |   +3 D was easier than C for me .
•  » » » 4 years 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
•  » » » » 4 years ago, # ^ |   +9 i solved it without dp it is easy if you know binary search on the answer
•  » » » » » 4 years ago, # ^ |   +3 Hmm. thank you for idea, but agree, dividing x by y is easier than implementing a binary search by answer :)
 » 4 years 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?
 » 4 years ago, # |   +3 Best difficulty gradient ever!
 » 4 years ago, # |   +14 i think if i had five min more i could solve D :(((
 » 4 years 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!
 » 4 years ago, # |   0 I really enjoyed problem C not too hard not too easy it's just how it should be
 » 4 years ago, # |   +11 Ashishgup's contests make me realize how much i lack in constructive and how dumb i am :(
•  » » 4 years ago, # ^ |   0 At least you didn't waste 20 min on A XD like how I did I feel so dump
 » 4 years ago, # | ← Rev. 2 →   -17 My previous post was receiving a lot of downvotes. So I have removed it
•  » » 4 years 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.
 » 4 years ago, # |   +27 Ashishgup Orz. 3 great contests 3 weeks in a row!
 » 4 years ago, # | ← Rev. 2 →   +2 My screencast of the round (solutions at the end)
 » 4 years ago, # | ← Rev. 2 →   +5 Thanks Ashishgup! Problems were really nice and very interesting! I will wait for your the next round.
 » 4 years 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
 » 4 years ago, # | ← Rev. 2 →   0 Does anyone know why this gives TLE for B
•  » » 4 years 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
 » 4 years ago, # |   0
 » 4 years ago, # |   +7 Ashishgup and team really do come up with some interesting problems everytime..Always new things to learn everytime!
•  » » 4 years ago, # ^ |   +8 UPD: Even upsolving is Fun!!
 » 4 years ago, # | ← Rev. 2 →   +7 Nice problemset! really enjoyed! problem E might get more AC if E came before D.
 » 4 years 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!
•  » » 4 years ago, # ^ |   +1 Thanks for fast update.
•  » » 4 years ago, # ^ |   +6 Hi Mike! Please also update problem ratings fast. It took 2 days to update the problem ratings in the Global Round :( Thanks!
•  » » 4 years 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 ...
 » 4 years ago, # | ← Rev. 4 →   -22 I'm getting TLE in this code of E problem . Can anyone help please ? 
•  » » 4 years ago, # ^ |   +5 You know you can provide link to your submission right ?
 » 4 years ago, # |   0 I found E easier than D. D's implementation was little tough so I proceeded to E. Best choice of my Life.
•  » » 4 years ago, # ^ |   0 I actually didn't find the implementation for D difficult. I believe the observation was more difficult to make.
•  » » » 4 years 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.
 » 4 years ago, # |   +8 Is there someone else who solved D with DSU?
•  » » 4 years ago, # ^ | ← Rev. 2 →   +16 Ya buddy!! well failed in contest though... Here is the submission 84521452Btw did anyone solve D using dp??
•  » » » 4 years ago, # ^ |   0 can you share your approach
•  » » » » 4 years 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
 » 4 years 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
•  » » 4 years 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 :)
•  » » » 4 years ago, # ^ |   0 Glad you liked the contest! Although it was unrated we had put in lot of efforts to create a good problem set. :)
•  » » » » 4 years ago, # ^ |   0 The problems were actually really good. I hope, we'll get to see more contests from you. :)
 » 4 years 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?
•  » » 4 years 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.
•  » » » 4 years 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!
•  » » » » 4 years ago, # ^ |   +1 I mean you'll be closer to the ratings you actually deserve. Here is the link to the official blog post.
 » 4 years 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
•  » » 4 years ago, # ^ |   +4 Ah another account just like me, ain't a noble profession as this :)
•  » » 4 years ago, # ^ |   0 Wow!! How did you catch these cheaters? Kudos!
•  » » » 4 years ago, # ^ |   +8 A magician never reveals his secrets.
 » 4 years ago, # |   +28 nice contest! I got to yellow. hopefully this is my last rated div2 contest ;)
 » 4 years 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.
•  » » 4 years ago, # ^ |   +16 You didn't waste your time ; you worked harder towards solving it .Cheers !
 » 4 years 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?
•  » » 4 years ago, # ^ |   +10 If you read the “hack input” part of the problem statement, you will find actually the first pair are the hidden nodes.
•  » » » 4 years ago, # ^ |   0 Ok, thanks.
 » 4 years ago, # |   +7 Thanks for the round. Especially the prestests were exceptional.
 » 4 years ago, # | ← Rev. 2 →   0 Codeforces Round #651Problem A and BProblem CProblem DProblem E
•  » » 4 years ago, # ^ |   0 Thanks Bro!!
 » 4 years 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
 » 4 years ago, # | ← Rev. 2 →   +13 Hi MikeMirzayanov please see this solution. How this solution passed? I think this is a bug which should be fixed.
•  » » 4 years ago, # ^ |   0 what is the bug
•  » » » 4 years ago, # ^ |   +8 He printed same indices again and again. Like 1 1 2 2 3 3 which can't be the solution.
•  » » 4 years ago, # ^ |   +3 There is definitely something wrong with this submission.
•  » » 4 years ago, # ^ |   +1 I guess the checker must be wrong !!