Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

### Ashishgup's blog

By Ashishgup, 4 weeks ago, ,

Hi everyone!

I would like to invite you to my fifth Codeforces Round, that I set with my friends FastestFinger, Vivek1998299 and ridbit10.

We are excited to bring another contest within a week :D

With that said, I bring to your attention our new Codeforces Round #648 (Div. 2) that will take place on Jun/07/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:

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

Good luck! :D

The scoring distribution will be: $500 - 750 - 1250 - 1500 - 2000 - 2500- 3000$

Upd: Quick Editorial — Hope you guys enjoyed the contest :D

• +2104

 » 4 weeks ago, # |   +1173
•  » » 4 weeks ago, # ^ | ← Rev. 3 →   +394 Contest quality certificate by antontrygubO_o.
•  » » » 4 weeks ago, # ^ |   +257 When I see this blog, I thought Mike already made you coordinator
•  » » » » 4 weeks ago, # ^ |   -38 That's will be great. You guys really makes very interesting questions.
•  » » » 4 weeks ago, # ^ |   -30 BTW what does div4 manager meant?? Is anton manager of div4 contests on codeforces or something else?antontrygubO_o
•  » » » 4 weeks ago, # ^ |   +3 Oh Yeah! Here we go again...
•  » » » 4 weeks ago, # ^ |   -30
•  » » 4 weeks ago, # ^ |   +1 Meanwhile antontrygubO_o with this comment.
•  » » 4 weeks ago, # ^ | ← Rev. 5 →   -117 .
•  » » » 4 weeks ago, # ^ |   0 You are not a tester..
•  » » 4 weeks ago, # ^ |   -12 we all know what happens finally in this meme story. lmao(ashishgup)
 » 4 weeks ago, # | ← Rev. 2 →   +129 As a tester, I found the problems diverse and very interesting to solve. I think this is will be a fun round for many. Participation is recommended :>
•  » » 4 weeks ago, # ^ |   +280 I second this, problems are genius
•  » » » 4 weeks ago, # ^ |   +40 Usually I would upvote the announcement after the round but this time I will take your word for it. Legendary lineup for problemsetters
•  » » » » 4 weeks ago, # ^ | ← Rev. 3 →   -20 BG
•  » » » » » 4 weeks ago, # ^ |   -18 What's a BG?
•  » » » » » » 4 weeks ago, # ^ |   0 Best Guy , Arsenal_FC knows better
•  » » » 4 weeks ago, # ^ |   +188 As someone who is neither a tester, author, coordinator, friend, or involved in the preparation of this contest at any level, I can confirm problems are genius.
•  » » » » 4 weeks ago, # ^ |   +32 So I guess "genius" is a keyword!
•  » » » » 4 weeks ago, # ^ |   +77 Monogon when will you host your next round?Your first round was genius, although it was destroyed due to long queues :(
 » 4 weeks ago, # |   +45 may be the fastest scoring distribution ever
•  » » 4 weeks ago, # ^ |   +10 If this is the fastest score distribution ever then what's about Codeforces Round #639 (Div. 1) which was written by Monogon !
 » 4 weeks ago, # | ← Rev. 3 →   -94 Deleted
•  » » 4 weeks ago, # ^ |   +138 Ah, shit. Here we go again.
•  » » » 4 weeks ago, # ^ |   +28 This blog is still not in home page, I wonder what happen after couple of hours :P Comment box will be flooded with those "proud" comments like previous round xd
•  » » » 4 weeks ago, # ^ |   +22 Ah shit. Here we go again!
•  » » » » 4 weeks ago, # ^ |   +16 plagiarism detected :P
•  » » » » 4 weeks ago, # ^ |   +20 Yes that level of spam will happen here xD
•  » » » » » 4 weeks ago, # ^ |   0 Definitely, I think I will come back every few hours just to look at the comments lol XD
•  » » » » 4 weeks ago, # ^ |   0 Hahaha, honestly didn't notice this. I just thought it to be an appropriate meme to comment, so I did. :) Btw, why will I farm contribution even after this? :)
•  » » » » » 4 weeks ago, # ^ |   +9 I did not want to accuse you of plagiarism or contribution farming. All I was trying to say was, the recurrence of "Ah shit here we go again". aaargh. nevermind. All fun is lost when you have to explain the joke.
•  » » » 4 weeks ago, # ^ |   -9 i dont know why but whenever i read this line anywhere Gta San Andreas music sound starts playing in mind
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   -49 Seriously your dream was having 2 Indian rounds in a week ? Congratulation in that case.
 » 4 weeks ago, # |   -78 even Div. 1 participants should find some of the tasks interesting If that is the case, why not take a div-1 round in parallel with 3 shared tasks (Div.2 C, D, E) ?
•  » » 4 weeks ago, # ^ |   +35 They need to get Div1 D,E,F then. Which is not easy to make
•  » » » 4 weeks ago, # ^ |   -90 They already have 7 problems. Both Div-2 and Div-1 would have 5 problems each with 3 shared.
•  » » » » 4 weeks ago, # ^ |   +26 That fits the contest problem-count wise. But what u are asking for is making the last 3 problems of div2 (which authors think are fine for div2) to last 3 problems of div1. They obviously won't be difficult enough.
•  » » » » 4 weeks ago, # ^ |   +5 I have solved C, D, E. I am not at that level so I can solve Div1ABC, so for Div1 this problem would be very easy.
•  » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   +8 I regret saying what I said. He said the tasks would be interesting for Div-1 users so I thought that maybe they would be hard. Turns out it was a speedforces with an easy F..
 » 4 weeks ago, # |   +2 Is it just me or are others too wondering where Ashishgup and friends have been during the last few months?
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +187 Easy. Busy with his GF.
•  » » » 4 weeks ago, # ^ |   +253 Oooh! But are you sure? I wrote "Ashishgup and friends".... They're all busy with his GF? ;)
•  » » » » 4 weeks ago, # ^ | ← Rev. 2 →   +34 ridbit10 was busy with some other girls.
•  » » » » » 4 weeks ago, # ^ |   -84 Can you not pls
•  » » » 4 weeks ago, # ^ |   -21 How do you know? Were you there?
•  » » » » 4 weeks ago, # ^ |   0 So many problems to solve on codeforces and in life, but people have to worry about who was where with who, why and when. Human Brain is so damn weird.
•  » » » 4 weeks ago, # ^ |   0 XD
 » 4 weeks ago, # |   +22 Was confused how did the comments from last Ashishgup's contest announcement changed only to find out it was a new contest XD
 » 4 weeks ago, # |   +115 even Div. 1 participants should find some of the tasks interesting goodbye rating.
•  » » 4 weeks ago, # ^ |   +14 But it will be tough for everyone so it should not affect your raking as it is relative, what was the point as if it is only tough for some, not all
 » 4 weeks ago, # | ← Rev. 2 →   -7 Deleted
 » 4 weeks ago, # |   +186 I'm so tired and sleepy right now that I read it as..You will be given 2 problems and 7 hours 15 minutes to solve them.
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +2 everything is possible:)
•  » » 4 weeks ago, # ^ |   -8 That would be the greatest contest ever.
 » 4 weeks ago, # |   +57 Why is this blog still not on the main page yet?I want my daily dose of cringe (from the proud Indians in the comments) and i cant wait any longer!
•  » » 4 weeks ago, # ^ |   +71 You're looking for quality cringe in the wrong place. Better search TikTok for quality cringe.
•  » » » 4 weeks ago, # ^ | ← Rev. 2 →   -14 Pretty sure i am at the right place looking at the comments on the last blog by Ashish and some comments on this blog.Edit — Turns out, not wrong at all. Here we go again — https://codeforces.com/blog/entry/78406?#comment-637124
•  » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 That comment actually looks sarcastic
•  » » 4 weeks ago, # ^ |   -71 Lol, jealousy dripping. Can easily guess you must be Ashish's batchmate being jealous of his achievements.
•  » » » 4 weeks ago, # ^ |   +79 Wait what? How does Ashish come into the picture? I am talking about the cringy Indian comments on his blog the last time around, and it has no relation with the points you are making.Improve your comprehension skills, and have the courage to put your name and college on your profile.PS — I am proud of ashishgup on what he has achieved, being his wingmate and batchmate for 3 years and watching him grow was a pleasure. So sit down, online troll.
•  » » » » 4 weeks ago, # ^ |   +39
 » 4 weeks ago, # |   -52 that C looks hard
 » 4 weeks ago, # | ← Rev. 2 →   +11 Thanks Ashishgup and Team For this effort.
 » 4 weeks ago, # |   -15 We are also excited to see another contest within a week :D Thanks
 » 4 weeks ago, # |   -35 I hope after the contest Ashishgup will be one the top ten contributors(as he has +155).
•  » » 4 weeks ago, # ^ | ← Rev. 4 →   -57 [deleted]
•  » » » 4 weeks ago, # ^ |   -12 are chill it keeps happening
•  » » 4 weeks ago, # ^ |   -6 Can be before the contest also as he is much like Indian code celeb.
 » 4 weeks ago, # | ← Rev. 2 →   -102 [retracted]
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   -72 [retracted]
•  » » » 4 weeks ago, # ^ |   +55 It's just a downvote. Don't take it too seriously.
•  » » » » 4 weeks ago, # ^ |   -39 Damn!! Learned my Lesson. Keep Downvoting!!!
•  » » 4 weeks ago, # ^ |   -44 If someone holds the record for most downvotes i want to beat that.
•  » » » 4 weeks ago, # ^ |   +9 Did you just use "reverse psychology"?
•  » » » » 4 weeks ago, # ^ |   +14 It didn't work
•  » » » » » 4 weeks ago, # ^ |   +9 Yeah it didn't work .
 » 4 weeks ago, # |   -94 Ashishgup be like : "yalgaar ho"
 » 4 weeks ago, # |   +7 Does that score distribution mean that it will be a speed-forces? With an easy D?
•  » » 4 weeks ago, # ^ |   +8 no speedforces with an easy F
 » 4 weeks ago, # | ← Rev. 3 →   +9 Eagerly waiting for the div 2 A. It was pretty nasty and amazing at the same time, the previous contest by the same authors.
 » 4 weeks ago, # |   0 Also this time we expect memetorials.
 » 4 weeks ago, # | ← Rev. 2 →   +38 CF-Community
•  » » 4 weeks ago, # ^ |   -15
 » 4 weeks ago, # |   -16 "We are excited to bring another contest within a week :D" Cool.
 » 4 weeks ago, # |   +3 Truly said — I become more excited when I see the score distribution like this way..
 » 4 weeks ago, # |   0 Is score distribution related to the rating of the problems ?
•  » » 4 weeks ago, # ^ |   +4 Since you seem to be an old CF contestant, this question is a little bit of weird!
 » 4 weeks ago, # |   -34 ohh god..once more contest prepared by[user:Ashishgup]...amaizing previous contest #646 ...does anyone remember "Guess The Maximums" problem ?... a very tricky one...hope to see more good problems this time also...
 » 4 weeks ago, # | ← Rev. 2 →   +37 Back to back Ashishgup rounds, nice :D. You are a nice motivation for me to prepare nice contests.I'm so curios, how many hours a day you spent for your contest? And so, how many hours it took to prepare this one?
•  » » 4 weeks ago, # ^ |   +18 Can i please test your next round?
•  » » » 4 weeks ago, # ^ |   +35 Hi! I estimate that it took us an average of $2$ hours per problem to come up with it, and roughly the same amount of time to prepare it on Polygon :)So around a total of $4$ hours per problem@Testing, sure! We'll invite you to test our next round :D
•  » » » » 4 weeks ago, # ^ | ← Rev. 4 →   +36 Wow man, you guys have FastestFinger s, it took about 40hours for me to prepare my problems (probable because i checked everything 4-5 times at least). Thank you ^-^.
•  » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   -16 That's the case!!! You have to give good enough time to make balanced contest, with 2 hour you make E sillier than A,B.
•  » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 DeadlyCritic Hey man,Are we expecting a Div 2 round soon for the problems which you prepared?
•  » » » » » » 4 weeks ago, # ^ |   +4 Probable . . .
•  » » » » 4 weeks ago, # ^ |   -80 Ashishgup please, also invite me to make contest with you
•  » » » » » 4 weeks ago, # ^ |   -41 son of bitchs downvoted my comment...fuck u all
 » 4 weeks ago, # |   +1 Can somebody please tell me what information can we infer from the scoring distribution?
•  » » 4 weeks ago, # ^ |   0 You can sort of guess the relative difficulty.
•  » » 4 weeks ago, # ^ |   0 Traditionally, the more score, the more difficult problem!
•  » » 4 weeks ago, # ^ |   -28 distribution of scores bro
 » 4 weeks ago, # |   -80 Ashishgup's Fan vote here.
 » 4 weeks ago, # | ← Rev. 2 →   -44 Please make a contest like last time.
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   -18 .
 » 4 weeks ago, # |   -23 Congratulations ! Finally, you got your place in top 10 contributors.
 » 4 weeks ago, # |   0 Namoosan vote up konid
•  » » 4 weeks ago, # ^ |   +3 Translation(not that much accurate) : Vote up FFS.
•  » » » 4 weeks ago, # ^ | ← Rev. 2 →   +2 Sick mind man :/ — But something like that :)
 » 4 weeks ago, # | ← Rev. 3 →   0 MikeMirzayanov- I think you are about to add another standing to CF's home page called most hated users. — You know, every single comment of mine is disliked for at least 30 times by default — And also CF has blocked me from commenting twice :) — However I'm too polite :/
•  » » 4 weeks ago, # ^ |   +3 To find most hated user on last page of Contribution Standing
 » 4 weeks ago, # |   -454 6 years back a visionary leader by the name of Honorable Narendra Modi democratically became the prime minister of the world's biggest democracy. His vision of Digital India to transform India into a digitally empowered society has certainly lead us to this proud moment where an Indian becomes the first person to hold 2 rounds within a week. Certainly its a proud moment for all the Indians on codeforces today. So excited...Jai Hind !!!
•  » » 4 weeks ago, # ^ |   +91 Just Shut up.
•  » » » 13 days ago, # ^ |   +9 bi adab shodia :)
•  » » 4 weeks ago, # ^ |   +184 As a fellow Indian, I request you to pls stop posting cringe content on CF. It only degrades everyone's opinion about us
•  » » 4 weeks ago, # ^ |   -18 Come-on man! You haven't eliminated dark web crimes!
•  » » 4 weeks ago, # ^ |   +22 This was cringy af.. to the next level..
•  » » » 4 weeks ago, # ^ |   -44 I'll take that as a complement.
•  » » » » 4 weeks ago, # ^ |   +10 Indeed. The best thing a quality cringe provides is the firm belief in itself. You embrace it and take everything said to as a compliment. Thanks for THAT quality of cringe. Now I'll make myself believe that I indeed gave you a compliment and then replied with a greater cringe just to show you what cringe of the first water can do to someone. No Offense.P.S. I think I failed with the quality of cringe but nvm.
•  » » » » » 4 weeks ago, # ^ |   0 Wow, I didn't get that but I liked that.
•  » » » » » » 4 weeks ago, # ^ |   +6 Wow, I didn't get that but I liked that. I feel the exact same when I read the explanation and code of some F or G.
•  » » » » » » » 4 weeks ago, # ^ |   +3 Lol. I'll suggest writing down an array and trying the shifting operations. Understanding how it can be done in 3n/2 operations is definitely difficult, rather first try to understand if it can be done. For G, initially don't think much about what a submask/mask is (those words are heavy and intimidating for me too). Just try to think about what bits are different. In the last part, they have said about using 6 bits, which might further intimidate you. But if the explanation were to be more complete, it isn't that difficult to understand. The reason is that there are 13C6 numbers which have 6 bits on and no two could be submask of each (note that the submask thing is necessary only for the second approach, not for the suboptimal one).
•  » » » » » » » » 4 weeks ago, # ^ |   +3 Welp.. I think u took it too far.. But thanks tho.. ur explanation is GREAT and I'm looking forward to solve that question with this. (y) Cheers mate!!But what I meant there was just an analogy to SOME F and G :)Have a good time. X
•  » » » » » » » » » 4 weeks ago, # ^ |   0 Oh lol okay, no problem. Have a nice day, you too.
•  » » » » 4 weeks ago, # ^ |   +5 seriously dude what's with the political cringe comment. you comment is making me sick. even if it was just for the fun purpose i would say it's a bad joke please stop posting this type comment please.
•  » » 4 weeks ago, # ^ |   +6 Cringe on CP platform is just something to be cherished. Cannot find it anywhere else!
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +13 we dont't do andh-bhakti here....(Indians can relate)
•  » » 4 weeks ago, # ^ |   -21
•  » » 4 weeks ago, # ^ |   -20 Bhakt will be bhakt.
•  » » 4 weeks ago, # ^ |   -12 Damn. The bhakti is strong af. Never knew we had middle-aged Indian uncles joining CF.
•  » » » 4 weeks ago, # ^ |   +1 Never knew we had dumb kids who cant understand sarcasm joining CF.
 » 4 weeks ago, # |   -13 Nice Score distribution .
 » 4 weeks ago, # |   -54 Excited for the Indian Round!!
 » 4 weeks ago, # |   -9
•  » » 4 weeks ago, # ^ |   -7 alas!dead again
 » 4 weeks ago, # |   -6 The scoring distribution makes me happy and afraid at the same time!
 » 4 weeks ago, # |   +7 Contests of Ashishgup always offer really good graph problems!
 » 4 weeks ago, # |   0 Ashishgup is now in top 10. Great!
 » 4 weeks ago, # |   -43
 » 4 weeks ago, # | ← Rev. 3 →   -11 Is there something wrong with problem's div1D checker? I got AC, but when i look at test logs i see stuff like this in several tests
•  » » 4 weeks ago, # ^ |   -9 82738980 -> link to my submission
•  » » 4 weeks ago, # ^ |   +9 It's okay. The relative error, which is $|1 - \frac{pa}{ja}|$, where $pa$ is the participant's answer and $ja$ is the jury's answer, is indeed less than $10^{-6}$.
 » 4 weeks ago, # | ← Rev. 3 →   -45 Very Helpful
•  » » 4 weeks ago, # ^ |   -12 Did you find this blog funny for you??
•  » » » 4 weeks ago, # ^ |   -9 Sorry, it's wrong.
 » 4 weeks ago, # | ← Rev. 2 →   -17 [Deleted]
 » 4 weeks ago, # |   +25
 » 4 weeks ago, # | ← Rev. 3 →   -13
 » 4 weeks ago, # | ← Rev. 2 →   +36 That's a truth...
 » 4 weeks ago, # |   0 Congratulations to Ashishgup.I think you are first Indian to be in top 10 in contributors in code forces.
•  » » 4 weeks ago, # ^ |   +17 Not the first time for him.He was among top 10 contributors ~19 months ago.
 » 4 weeks ago, # |   +74
•  » » 4 weeks ago, # ^ |   +5 Шутка смешная, а ситуация страшная.
 » 4 weeks ago, # |   +14 How is contribution calculated , i mean Ashishgup has +162 and BledDest has +126 ,But BledDest has authored many contents than Ashishgup
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +8
•  » » 4 weeks ago, # ^ |   -21 Bleddest has only 5 blogs in the last 6 months. Also ashish has got way more upvotes on his blogs than Bleddest in that time. Plus he has way more comments.
•  » » 4 weeks ago, # ^ |   +226 pikmike takes most of my contribution for rounds' announcements
 » 4 weeks ago, # |   -38 is it rated?
•  » » 4 weeks ago, # ^ |   +9 nah
•  » » 4 weeks ago, # ^ |   +6 Of course not. No contest in the history of Codeforces has ever been rated.
 » 4 weeks ago, # |   +18 Is it only me who feels that 1st question is comparatively difficult to other Div2 contests when there are Indian setters!
 » 4 weeks ago, # |   -30 Hello, MikeMirzayanov my net connection got lost. So, I can't compete now fluently. Moreover, I have submitted A and B. Please make the round unrated for me
•  » » 4 weeks ago, # ^ |   0 What you want ,, Actually not possible .. Many people also face this problem regular .
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +17 "Hello, MikeMirzayanov,my girlfriend broke up with me in the middle of the contest.So,I couldn't concentrate. Morever,I have submitted A.Please make the round unrated for me."If he replies,please forward my message too.
•  » » » 4 weeks ago, # ^ |   +8 come on, scarlett is not a pedo!
•  » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 It takes a rating of 1800 just to understand your comment.orA genius like me.shahil_005 is neither.
•  » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   +3 People call this a burn,but the contest has already blazed me down completely,Your efforts are in vain,So sorry(Sad Reacts).
•  » » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 The world needs more people like you.Take a upvote.
•  » » » » 4 weeks ago, # ^ |   0 SpoilerBut monica is ♥‿♥
•  » » » » » 4 weeks ago, # ^ |   0 wtf do you mean Richard, with the fancy moustache?
 » 4 weeks ago, # |   -140 Ashishgup you should stop making contest. Your constest aren't good at all. It contains very weird questions. Please codeforces don't let your status go down because of them. Many people registered for the contest but a lot of them just backed off. This is sad. Your Div 2 problems are interesting but it doesn't qualify for the real contest maybe a unrated one (practice round) would be better. :)
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +49 Div. 2 contests are targeted towards somewhat experienced programmers. If you feel like div. 2 is too hard for you, there's no shame in starting off in a lower division. I recommend participating in the division you can comfortably solve at least 2 problems during a contest (if you want some challenge) or the lowest division that is still rated for you.Regarding practice contests, you can always participate in old contests virtually (basically a simulation of the real contest) or just solve old problems until you feel like you are ready to take on div. 2.
•  » » » 4 weeks ago, # ^ |   +2 I am seeing Experts with 1800 rating and CMs not being able to solve A in my friends list. While the entire contest may be good, A is certainly overkill for a div2.Personally, I have not been able to solve a single question till now. While I cannot claim to be good at CP, I have generally been able to solve AB in div2 at least.
•  » » » » 4 weeks ago, # ^ |   +28 A is not overkill. its just difficult and require more logical thinking than other As. What is the point if all the Div2 As are cakewalks ?? sometimes its refreshing to see questions which are just not speed test and requires you to think for some time.
•  » » » » 4 weeks ago, # ^ |   +20 Sorry, but contest was too easy for div2, i think it's div3 level. if u cant solve so easy problems u should just practice a much better
 » 4 weeks ago, # |   +41 Hi!Unfortunately, CF-Predictor may not be able to handle as many contestants/users as we have today. I have an idea for the optimization that should resolve the issue, but I need time to implement it. I'm not 100% sure it'll help (because I'm using a free heroku account and it has bunch of limitations). If the extension or usual website (http://cf-predictor-frontend.herokuapp.com/) go down today, feel free to use another replica
 » 4 weeks ago, # |   -10 I know I am not very good at CP. But this contest has made me seriously think about whether I should even continue practicing it or not. In most of div2 contests. I was able to solve 1-2 problems. But this one is just....
•  » » 4 weeks ago, # ^ |   0 I sometimes think I should change my username to pupil4ever. After every contest I feel that way. But you know what I am not giving up that easily. It takes years and a lot of patience to become good at CP and keep that kind of patience. Just keep going no matter what. Keep practicing no matter what. And on a serious note, If a drop in the rating demotivated you then choose virtual participation. Its awesome. Take part in each and every div3 contest no matter what.
•  » » » 4 weeks ago, # ^ |   0 I will take this into account for sure and keep practicing. Thanks!
 » 4 weeks ago, # |   -36 This round sucks!!!
 » 4 weeks ago, # |   +17 Wired Contest. I can solve ACDEF, but just can't solve B.
•  » » 4 weeks ago, # ^ |   +3 The trick is to notice, that you can get any sequence, if you have both kinds of b (0 and 1).
•  » » » 4 weeks ago, # ^ |   +3 You are right. A simple '0' or '1' could change a lot.
•  » » 4 weeks ago, # ^ |   0 Do we also swap value of b[i] ?
•  » » » 4 weeks ago, # ^ |   0 Yes.
 » 4 weeks ago, # |   +99 This round will teach most of the new comers that logical thinking is the first step in competitive programming, not the knowledge of all the data structures and algorithms. The first thing you need to develop is logical thinking. The one contest comes where you need to think instead of use some tricks or data structures, do not complain about the lack of it. Logical reasoning and thinking is an important part and should be treated at such. Also the problem difficulty is increasing uniformly, which has somewhat become rare in recent contests. Kudos to setters !
•  » » 4 weeks ago, # ^ |   0 Agree! I would like to see more pure algo rounds like this when you don't need to remember some specific math/geometry/etc
 » 4 weeks ago, # |   +4 Wow :) Thanx Ashishgup for such good contests lately
 » 4 weeks ago, # |   +5 Can someone tell me whats wrong with following logic for D ?I take count of bad and good and if good person are zero, answer is always yes.If bad persons are zero, check if all good can reach the end or not. Now I check if any Bad person has a good person immediately next to him. If yes, then they cannot be blocked and answer would be No. If all the bad persons can be blocked, I block them and then check if all the remaining good persons can reach the end or not. Any idea what I can be missing ??
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   -6 WRONG EXAMPLE
•  » » » 4 weeks ago, # ^ |   0 This is an invalid example, because the statement says 'It is guaranteed that the cell (n,m) is empty'
•  » » 4 weeks ago, # ^ |   0 Yes thats what I also did and it passed pretest. I block by putting wall on 4 side of B.
•  » » 4 weeks ago, # ^ | ← Rev. 3 →   +13 Your idea is right but you did something wrong on implementation.dx should be {0,0,1,-1}. ll dx[] ={0,0,1,1}; ll dy[] ={1,-1,0,0}; 
•  » » » 4 weeks ago, # ^ |   +3 Oh thanks. :(
•  » » 4 weeks ago, # ^ |   0 You have to block all neighbours of bad persons also. This is clearly necessary, and we can prove it is sufficient.
•  » » 4 weeks ago, # ^ |   0 Maybe you made the same mistake I did. I didn't notice that if a cell has a bad person then you can't block that cell.
 » 4 weeks ago, # |   -28 After E:
 » 4 weeks ago, # | ← Rev. 4 →   0 .
•  » » 4 weeks ago, # ^ | ← Rev. 4 →   +5 .
 » 4 weeks ago, # |   +16 After knowing E solution:
 » 4 weeks ago, # |   0 How to solve E??? I know maybe it uses greedy strategy, I tried something with choosing numbers with highest bit set and then choosing atmost 2 more, just random submission. So someone give a subtle clue please!
•  » » 4 weeks ago, # ^ |   +6 Just choose maximum or between 3 vals.
•  » » 4 weeks ago, # ^ |   +3 There always exist an optimal solution with $k <= 3$
•  » » 4 weeks ago, # ^ |   +6 $n = 1$, ans = $a[0]$. $n = 2$, ans = $a[0]$ | $a[1]$. else ans is triplet with maximum or.
•  » » » 4 weeks ago, # ^ |   0 Can you show example when we need triplet, not just maximum element?
•  » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 If I understood you correctly. 31 2 4
•  » » » » » 4 weeks ago, # ^ |   0 Oh, maybe I misunderstood the question. What output will be for this example?
•  » » » » » » 4 weeks ago, # ^ |   0 Should be 7 which is the OR of the 3 numbers.
•  » » » » » » » 4 weeks ago, # ^ |   0 But we can just take the k = 1 and sequence {4} for this example, and we get the same answer, no?
•  » » » » » » » » 4 weeks ago, # ^ |   0 I think you misunderstood the question. If we take just the 4 answer will be 4.
•  » » » » 4 weeks ago, # ^ |   0 In the case of 3 numbers with "independent" bits, like $2^0$, $2^1$, $2^2$ it is optimal to choose all 3.
•  » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 How to find the triplet with maximum or?
•  » » » » 4 weeks ago, # ^ |   0 Brute force, O(n^3)
•  » » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 Umm, then I want to die.This don't pass. Spoiler#include using namespace std; typedef long long int ll; ll p[61]; void load() { p[0] = 1; for(int i=1; i<=60; i++) { p[i] = 2*p[i-1]; } } ll f(ll n) { ll res = 0; for(int i=60; i>=0; i--) { ll v = n / p[i]; if(v%2==1) { res += p[i]; } } return res; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); load(); int n; cin>>n; ll a[n]; for(int i=0; i>a[i]; } ll ans = 0; for(int i=0; i
•  » » » » » » 4 weeks ago, # ^ |   +3 Why do you call f(y)? Just use y as is.
•  » » » » » » » 4 weeks ago, # ^ |   0 Oh god, I'm stupid.
•  » » » » » » » » 4 weeks ago, # ^ |   0 You where more near to the solution than me ;)
•  » » 4 weeks ago, # ^ |   +19 the best way to make a set is using K=3 or 2 or 1:if u choose 3 number and trying choose 4th number to change anything, 1st 2nd or 3rd must constain some bit that u find in 4th number. but u already have this bit, so u dont need k > 3
•  » » » 4 weeks ago, # ^ |   0 Oh my god I was thinking about that max(1, k-2) condition and choosing 3 but thought $n^3$ wont pass. Maybe it can be done in $O(n^2)$ but I get your point, nicely said.
•  » » » » 4 weeks ago, # ^ |   0 O(N^3) will pass
•  » » » » » 4 weeks ago, # ^ |   0 Mine did not :thinking:
•  » » » » » » 4 weeks ago, # ^ |   0 I looked at your code, you should simply have used or operator | rather than looping over 60 or so bits! I guess that lead to TLE.
•  » » » » » » » 4 weeks ago, # ^ |   0 Yes :facepalm:
•  » » » » » 4 weeks ago, # ^ |   0 Oh yes you are correct I calculated operations as $500^3 \times 64$ (64 for the bits of numbers) but I think its not like that
•  » » » » 4 weeks ago, # ^ |   0 to don't get this mistake again u can calculate time of work (kinda), if u have n'3 with n = 500, code will make 1,25 * 10^8 operations. we have very weak operations and c++ can make 4 * 10^8 of weak operations (if u use pragma u can reach 10^10 op.). c++ can make 10^8 of big(idk how say it) operations (like n log of segment tree). => u code will pass the pretest in this problem
•  » » » 4 weeks ago, # ^ |   0 why is this true?
 » 4 weeks ago, # |   0 What is the solution for G?
•  » » 4 weeks ago, # ^ |   0 SpoilerAssign id to each position such that all ids are distinct and for each $id(i)$, there are exactly $7$ 1-bits. Since $ncr(13, 7)\gt 1000$, we can assign the ids to every position such that $id(i)\lt 2^{13}$.We can then do $13$ queries. The $i^{th}$ query will contain position $x$ if $id(x)$ & $2^i$ is not equal to zero. Let's store the query answer as $val(i)$ for the $i^{th}$ query.For every pair of $i, j$, since the ids are distinct and all ids have exactly 7 1-bits, $id(i)$ will be different to $id(j)$ for at least one bit. We know that the answer for position $i$ will then be, or-sum of $val(x)$ such that $x$ & $id(i)$ equals to zero.
 » 4 weeks ago, # |   0 any hints for A and B?
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   0 For problem B If all the b's are equal and a single b is different, then it can be sorted.
•  » » 4 weeks ago, # ^ |   +5 For Atake all the rows and columns which are all zeros.now whenever you make a move, one row and one column is reduced. so the max number of moves possible are minimum number of available rows or columns. That numbers decides who wins the game. For BIf there is atleast 1 element with b_i 0 and 1, you can always sort the array. Other wise check if it is already sorted or not.
•  » » » 4 weeks ago, # ^ |   0 Can you sort this test case by your approach ? 3 2 1 0 1 1
•  » » » » 4 weeks ago, # ^ |   0 Swap 3 and 1 since they both have different b_i values.
 » 4 weeks ago, # |   +72 The worst round i've ever seen. ABEF — is like A, but many participants can't solve just because it's E,F and can't be so stupid. ABEF is much easier than CD (bcs here u need some brain)
•  » » 4 weeks ago, # ^ |   0 Exactly!!! Again disappointed with this guy!
•  » » 4 weeks ago, # ^ |   +3 I solved C faster than A and B. But got stuck in E, was not able to see the simplicity.
 » 4 weeks ago, # |   0 I got two WA in A and one in D -_-Nice problems!
 » 4 weeks ago, # |   +8 May be Fastest Editorial overall ..Thanks
 » 4 weeks ago, # |   +9 Took me 6 attempts to realize.. Just one dfs call was required in D. facepalm
 » 4 weeks ago, # |   +4 Great round! Excellent variety of problems. Finally doesn't look like mathforces/bitforces and real algorithmic round.
 » 4 weeks ago, # |   -17 Though I did not give this contest I can tell that this is the best div2 round ever.Ashishgup orz
 » 4 weeks ago, # |   +33
 » 4 weeks ago, # |   -11 Very interesting problems. . . . .BUT mmmmmyyyy GOD !!! THEY ARE PRETTY HARD....Its okay to give challenges but there should be SOME MERCY TOO !!!!! Else beginners will suffer INFERIORITY COMPLEX AT A GREAT LEVEL !!!!!!
 » 4 weeks ago, # |   +56 Definitely one of the best rounds I have ever participated. I really enjoy these problems which emphasize the process of thinking and proving special properties, instead of the boring implementationforces.
 » 4 weeks ago, # |   -12 F was so easy for me, and was a 2-liner, why was it kept before E? I would've got F much earlier but I couldn't get E and so went on to G as it was interactive, and read F only at the end of the contest. So unlucky :(
 » 4 weeks ago, # |   +5 WTF was testcase 38 in F?
•  » » 4 weeks ago, # ^ |   0 I think in that we needed to check that array a and b are actually permutation of each other, i.e. no extra element is present.
•  » » » 4 weeks ago, # ^ |   0 No
•  » » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 I just compared two of your solutions, the difference in this line: Accepted: if(cnt[{b[i], b[n-i-1]}] <= 0) VS Failed: if(cnt[{b[i], b[n-i-1]}] == 0) My best guess that initialization of map[pair{}] first return not zero in some cases. I really confused, and would appreciate if someone chime in explain the mystery how negative value can happen and zero never showed up.BTW this submition 82857329 should pass if you use multiset.
•  » » 4 weeks ago, # ^ |   +3 My solution also failed at test 38. I was using a set. Got AC by changing it to multiset
•  » » » 4 weeks ago, # ^ |   +5 that's what I suggested in comment above from 6 hours before your :-)
 » 4 weeks ago, # |   0 Was G something like there are only 63 elements we care about at most so pick random subset of half the remaining elements to narrow down where it could be? Only other idea I had was parallel binary search but couldn’t narrow down past 20 queries with this
•  » » 4 weeks ago, # ^ |   0 Yep, i guess it should work, i was trying to code it but unfortunately i couldn't come up with a good implementation, so i ended up with half of a spaghetti-code.
•  » » 4 weeks ago, # ^ | ← Rev. 3 →   +3 This solution for G is wrongI have an idea, but couldn't implement it in time. Here it goes:Idea is similar to Hamming code.Queries are like this(blue means queried, white not queried)(every line is a query):You can see every position has covered by unique combination of queries: $p_1 = 1111$ $p_2 = 1110$ $p_3 = 1101$ $p_4 = 1100$ $p_5 = 1011$ $p_6 = 1010$ etc. $p_i$ would be equal to AND of these queries
•  » » » 4 weeks ago, # ^ |   +5 Right this is the parallel binary search I mentioned. I actually don’t think you can do better than 20 queries with this method, but I could be wrong. One way to describe your queries is that the i’th query contains all elements with the i’th bit set to 0. I think the problem is that you only get information for the entries that you didn’t query. So if the first element has a lot of unique bits then they won’t be detected ever, I believe. So I think it is possible to create some adversarial cases that force you to use more queries. You might be able to prevent this through randomization, but not entirely sure.
•  » » » » 4 weeks ago, # ^ |   0 You are right, other entries can mess with answer, thanks for finding the mistake
 » 4 weeks ago, # |   +23
 » 4 weeks ago, # |   +4 Nice contest. I enjoyed solving all :p
•  » » 4 weeks ago, # ^ |   +12 why the downvotes?
•  » » » 4 weeks ago, # ^ |   +4 No idea
 » 4 weeks ago, # |   +43 Hey nice problems, thanks!But one suggestion. In A text goes like "...and does not share a row or column with any...".The usual wording is more like "Does not have a row or col in common". The word "share" is most of the times used to denote borders of cells next to each other. Since as a problem that would make sense, too, it is missunderstandable.
•  » » 4 weeks ago, # ^ |   +3 Guess who wasted 1 hour interpreting the question like that?
•  » » » 4 weeks ago, # ^ |   +25 You.
•  » » 4 weeks ago, # ^ |   +2 My whole contest got fucked up due to that. It mislead me that they do not share a common edge. Now i realised he means that cell(i.j) can be occupied if and only if ith row and jth column is unoccupied.
•  » » » 4 weeks ago, # ^ |   +6 And the edge problem is much harder... ;)
•  » » » 4 weeks ago, # ^ |   0 You can always ask the problem setters to clarify during the contest.
•  » » » » 4 weeks ago, # ^ |   +4 I you missunderstand something you can not ask, because you do not know that you did missunderstand it.
•  » » » » 4 weeks ago, # ^ |   0 Bro how can i know if i would have known i could have solved other way around. I know about this feature i knew if after i read editorial.
•  » » » 4 weeks ago, # ^ |   0 Yesss.... Same here.... Me too misunderstood that.... And can't make it why I couldn't solve the first problem.....
•  » » 4 weeks ago, # ^ |   0 Both phrases are synonyms of each other. It is mathematically correct to use either.
•  » » » 4 weeks ago, # ^ |   0 Yes, of course it is correct.
 » 4 weeks ago, # |   +3 How do you downvote an announcement after upvoting it :-/
•  » » 4 weeks ago, # ^ |   0 I don't think you can.
•  » » 4 weeks ago, # ^ |   +5
•  » » 4 weeks ago, # ^ |   0 Create two fake accounts and downvote twice. P.S. It is hackney idea but someone had to say it :P
•  » » 4 weeks ago, # ^ |   0 Make new account and give Downvote .. But I think, this contest does not deserve downvote .
 » 4 weeks ago, # |   +17 I really liked the problems, nice job ashishgup, indeed it was never a normal div2 round, i think they were very nice for IQ/creativity test. They were like problems in first round of Computing Olympiads in Iran, but indeed they were way harder. Thank you all(authors, coordinator and etc) for such nice problems.
•  » » 4 weeks ago, # ^ |   -8 Statement of A could have been more clear else i like the contest
 » 4 weeks ago, # |   -13 After a lot of wrong answers,the pretest passed in last 12 seconds for D xD
 » 4 weeks ago, # |   +3 may be swap(A,B) better ..i think B is more easy than A.. :3
 » 4 weeks ago, # |   -17 Adhoc Forces How to downvote an announcement please say
•  » » 4 weeks ago, # ^ |   +37 Observation Forces I'd say
•  » » » 4 weeks ago, # ^ |   -31 Ya every problem involving a lot of observation Observational Problems till A and B are OK but when C and D and E involve it then it becomes shit ,hope setters in fututre will keep it in mind!
•  » » » » 4 weeks ago, # ^ |   +5 The what, so all div1 contests are shit because their DEF div1s usually involve a lot of observations and that should only be limited to AB div 2s instead?
 » 4 weeks ago, # |   0 Can anyone explain E for test case 2 1 1 4 1 8 how can we get 14 , if i take both 2 and 8 there will be 3 ones which don't have their 2nd and 4th bit-set so how is the condition "at least max(1,k−2) (max(6-2,1)=4) elements of the subsequence have the i-th bit set in their binary representation" is satisfied for the 2nd and 4th bit?pls explain
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   0 choose the triplet $2$ $4$ $8$. 0010 0100 1000 bits with i = 1, 2, 3 can be taken since they have atleast a one in their binary representation and since k = 3, we need atleast just 1 bit so our answer will be 14.
•  » » 4 weeks ago, # ^ |   0 Take 8, 4 and 2. Then k = 3.
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   0 k is the length of the chosen subsequence (k = 3), the length of the main sequence is n (n = 6).
 » 4 weeks ago, # |   0 Nice problems! Sorry to bother, but could someone please help me understand why I got a runtime error on prob A pretest 1 82790397? I see nothing wrong with it, also it runs fine compiled on my machine. I ended up rewriting the code in python to make it work. Thanks
•  » » 4 weeks ago, # ^ | ← Rev. 2 →   +3 I think it should've been "col(m), row(n)" instead of "col(n), row(m)". (Since vectors reserve a bit more space than you asked for to allow amortized O(1) pushback, making this mistake doesn't necessarily cause a Run Error (I think), that could be why it worked on your machine but not on the server.)
•  » » » 4 weeks ago, # ^ |   +3 ... aaaand you are right. Embarrassing mistake. Thanks a lot for checking!!!
 » 4 weeks ago, # |   0 Problem E i submitted it using DP with 500*3 instead of BF (500)^3 but it gave me WA on TEST 6 can anyone explain please the code
 » 4 weeks ago, # |   +16 Nice problems but I feel like the difficulties (from problem to problem) could have increased a bit faster — with such small increases it felt more like Div. 3 to me (that is, more stressful than Div. 2 due to needing to solve more problems to stay in the "positive rating change"-range).
 » 4 weeks ago, # |   0 Problem D video editorial: sOlUtiOn
 » 4 weeks ago, # | ← Rev. 2 →   0 My idea for the solution to D is check if the bad guys can reach the end, if yes, then block all the neighbouring cells. Then check if all good guys can reach the end. Why does this fail on pretest 7?Link to my submission : https://codeforces.com/contest/1365/submission/82872417
•  » » 4 weeks ago, # ^ |   0 If there is a bad guy in a neighbour of the destination cell, then your code is blocking the destination cell. In such cases, if there is a good guy in a cell reachable from the destination cell, the answer should be "No", but you code prints "Yes". See this case for example: 3 5 ..G.. B###. ..... 
•  » » » 4 weeks ago, # ^ | ← Rev. 2 →   0 There's a typo in my code. That's why it fails. But for your case the answer is YES right? because you can build a wall above and below the bad guy.
•  » » » » 4 weeks ago, # ^ |   0 Yes, for this test case answer should be Yes.
 » 4 weeks ago, # |   +126 A request to future problem-setters, please try to break a long sentence into several sentences. For example this one:
•  » » 4 weeks ago, # ^ |   0 Yep for the first 20 mins I was like I need to do summation of 2^i for each element or essentially the sum
 » 4 weeks ago, # | ← Rev. 3 →   -40 The whole contest gets ruined if the first problem does not go as planned and the statement was quite misleading. I solved the whole time considering border should not be shared for each cell. Even any announcement was also not made to clarify the statement. Is it enough reason to make round unrated as a lot of participant wasted a lot of time on this which was rather a very easy problem ? PS — I completely understood the problem only after reading editorial otherwise it was a mystery to me.
•  » » 4 weeks ago, # ^ |   +20 There was nothing misleading in the statement. It was written that you can only claim cells which do not share a row or column with any already claimed cells. There was no announcement, because there was no need of an announcement.
 » 4 weeks ago, # |   0 C-Constructive
 » 4 weeks ago, # |   0 Does failing on sample tests counts for penalty??If not then for me, It's showing 3 penalties even though one of the wrong attempt is wrong answer on pretest 3 (last sample case)
•  » » 4 weeks ago, # ^ |   +4 I think only test case 1 is counted out of penalty.