### AlFlen's blog

By AlFlen, 9 months ago, translation,

Hello, Codeforces!

74TrAkToR and I are glad to invite you to our Codeforces Round #662 (Div. 2), which will be held at Aug/07/2020 17:35 (Moscow time). The round will be rated for all the participants with rating strictly less than 2100.

The problems were created and prepared by AlFlen and 74TrAkToR. We would also like to thank everyone who helped us a lot with round preparation.

On the round you will be asked to help main ponies from My Little Pony animated series (Fluttershy, Applejack, Twilight Sparkle, Pinkie Pie, Rarity, Rainbow Dash) and to solve 5 problems, one of which has two subtasks. You will have 2 hours to solve them.

Score distribution will be announced shortly before the round.

UPD: Score distribution: 500 — 1000 — 1500 — 1750 — (1500 + 1500)

UPD2: Editorial

We wish you good luck and high rating!

• +229

 » 8 months ago, # | ← Rev. 3 →   +119 As a tester, give me contribution, please:) UPD:( UPD1:)) Thanks you.
•  » » 8 months ago, # ^ |   +115 Unrelated question: How to become a tester? I'm asking for real, not for gaining contribution. ;)
•  » » » 8 months ago, # ^ |   +46 Basically, testers are friends of the authors. Also, some testers are people with a lot of contribution.
•  » » » » 8 months ago, # ^ |   +124 As we can see, people with negative contribuion can become testers too.
•  » » » » 8 months ago, # ^ |   +73 Aahhh! I see. Going to google now "How to make friends in codeforces". ;__;
•  » » » » » 8 months ago, # ^ | ← Rev. 2 →   +23 For making friends in codeforces there is a star in the profile page next to the handle!More seriously, it is good to be a friend of the author IRL.
•  » » » » » » 8 months ago, # ^ |   +10 LMAO, I know how to add friends in cf lol. By doing that how will the other person know I've added him as a friend. I was referring to getting in touch with contest hosters and problem setters.
•  » » » » 8 months ago, # ^ |   +11 err I think you got it wrong.The reason testers have high contribution is because they gain contribution after being a well-reputed tester, not necessarily because they started with high contrib.Basically, testers gain contrib, so to say all testers need to start with high contribution is a logical fallacy.
•  » » » 8 months ago, # ^ |   -23 You can ask about it MikeMirzayanov or if you know problemsetters you can ask they.
•  » » » » 8 months ago, # ^ |   0 Cool.Cool.Cool.Cool.Cooooool..... You mean like message MikeMirzayanov???
•  » » » » » 8 months ago, # ^ |   +19 Yes.
•  » » » » » » 8 months ago, # ^ |   +14 Sent this message 4 months ago.....
•  » » » » » » » 8 months ago, # ^ |   +33 It's like messaging Mark Zuckerberg on Facebook..... :D
•  » » » 8 months ago, # ^ |   0 become tourist. then everyone will want you to test. the end.
•  » » » » 8 months ago, # ^ | ← Rev. 3 →   -107 this is just stupid, stfu.
•  » » 8 months ago, # ^ |   +3 u dont have idea how ugly the question statements are and kind of worthless .Shittttiest contest ever writing this while contest in undergoing predict my frustation level..
•  » » » 8 months ago, # ^ |   -7 You can't even solve div3 problems. stop bashing.
•  » » » » 8 months ago, # ^ |   -72 Yea i can see who is saying this the one having 12000 rank in prev div 2 contest .Keep up the good work .
•  » » » » » 8 months ago, # ^ |   +34 At least I was able to solve 3 problems in div3 round where you cheated.
•  » » » » » » 8 months ago, # ^ |   -111 See how much spare time u do have checking on random peoples u wanna be one on one ping me we will talk there . Crybaby there is an iitian in the house
•  » » » » » » » 8 months ago, # ^ |   +32 What's the point of being an IITian if you still have to cheat?
•  » » » » » » » » 8 months ago, # ^ |   +47 Maybe he is of reserved category, lol
•  » » » » » » » » » 8 months ago, # ^ |   -35 Yeah i am if u are such a racist thiugh u should know in india caste discrimination is a crime .
•  » » » » » » » » » 8 months ago, # ^ |   +15 Dude, you got the seat because of your caste. Why do you expect others to not call you a reserved category guy? Deserving people sacrificed their seats so that you can study there.
•  » » » » » » » » » 8 months ago, # ^ |   0 I think you dont now the meaning of "race" but okay. anyways shouldn't comment regarding reserved cateogry like that. But yeah you def need a little civil education.
•  » » » » » » » » » 8 months ago, # ^ |   0 Bro am not from reserved category it was just to shut him up :-)
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 sorry
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 3 →   0 Paasi bol paasi hu
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 thoufondYou know you can be punished under the provisions of the Scheduled Castes and Scheduled Tribes (Prevention of Atrocities) act, 1989?
•  » » » » » » » » » 8 months ago, # ^ |   0 thanks for shutting them up.
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 arayanc403no offense!!You got me!! hands up
•  » » » » » » » 8 months ago, # ^ |   0 I get it dude....the problems were really long enough to make anyone feel to leave it(at least for me). But bragging about being an IITian is not worth it. Peace:)
•  » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 i edited it
•  » » » » » » » » » 8 months ago, # ^ |   0 It was like he was challenging me and i was already so frustated so came up with this ugly solution :'(
•  » » » » » » » » » 8 months ago, # ^ |   0 u praise urself for being an iitian and still cheat in contests .I dont know wht else to say .
•  » » » » » » » 8 months ago, # ^ |   0 Bro!! It is a humble request .. Please don't lower the standards of IIT's in our country unless you are from reserved category(PS: then you took the seat of other deserved candidates due to some shitty political policies). If you are an IITian.. good for you but then if you need a tag on your shirt stating that.. sorry bro you don't deserve it. PS: I was deeply frustrated after reading your shitty comments and so had to write all of it.
•  » » » » » » 8 months ago, # ^ |   0 Does 'skipped' means that he cheated?
•  » » » » » » » 8 months ago, # ^ |   0 Yes
•  » » » » » » » » 8 months ago, # ^ |   -52 Ya ankit i respect your words but the thing is i submitted one of my friends solution coz i wasnt willing to go further in the contest as i got some work i heard somewhere that if you copy someones code the contest will be unrated thats all i did . And i dont know what is the point of this guy to just poke in my comment worthlessly out of nowhere kinda frustating already the contest was not up to the mark so thats all .. Anyways i feel bad about my prev comment :) thanks dude
•  » » » » » » » » » 8 months ago, # ^ |   +17 yeah sure, you submitted for the 3 problems for it to be unrated and not for only one or two problems :)
•  » » » » » » 8 months ago, # ^ |   +15 Thanks, you helped me find my food.
•  » » » 8 months ago, # ^ |   +1 It wasn't unreadable though..
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 What's wrong with the testers today? Why didn't they reject the author's long,boring,shitty storied statements? Did they hesitate because it's a girl?
•  » » 8 months ago, # ^ |   +20 As a tester , were u able to understand the problems ?
•  » » 8 months ago, # ^ |   -14 The Pretests of question number 2 should be strong. My code Passed pretests but failed after. I am just giving feedback and not complaining. It's real heartbreak to see that red written "System test fails"!
 » 8 months ago, # | ← Rev. 2 →   -102 !
•  » » 8 months ago, # ^ |   +82 girl
•  » » » 8 months ago, # ^ | ← Rev. 2 →   -77 girl, i think.
•  » » » 8 months ago, # ^ |   +206 Pony
•  » » » 8 months ago, # ^ |   -112 Sexy !!!
•  » » » 8 months ago, # ^ |   -23 a "Doomer" girl to be accurate.
•  » » 8 months ago, # ^ |   -57 SIMP!
•  » » » 8 months ago, # ^ |   -20 LOL
•  » » 8 months ago, # ^ |   +12 ARE YOU A GIRL OR A BOY?
•  » » » 8 months ago, # ^ |   +1 Boy
•  » » 8 months ago, # ^ |   +34 74TrAkToR, are you a boy or girl?
•  » » » 8 months ago, # ^ |   -32 boy
•  » » » » 8 months ago, # ^ |   +117 there goes all hope.
•  » » 8 months ago, # ^ |   0 She is Ekaterina
•  » » 8 months ago, # ^ |   0 What was this girl and that explanation mark and that pony, shit posting or something very deep?
 » 8 months ago, # |   +29 Why 6 ponies but 5 problems?
•  » » 8 months ago, # ^ |   +139 The 6th one might be the over smart one creating a harder subtask.
•  » » 8 months ago, # ^ |   +44 The 6th is me : )
•  » » » 8 months ago, # ^ |   +7 Did you change your dp for making that comment?
•  » » » » 8 months ago, # ^ |   +13 I use my little pony to denote my max delta.
•  » » » » » 8 months ago, # ^ |   +19 before it was this, because my maximum was a pupil
•  » » » 8 months ago, # ^ |   0 OMG yess haha
•  » » 8 months ago, # ^ |   0 The 2 of the ponies are twins as 2 subtasks.
 » 8 months ago, # |   +2 Nice pic for seek attraction!!
 » 8 months ago, # |   +37 I feel old now ;)
 » 8 months ago, # |   +6 I love watching "My Little Pony" cartoons, so I look forward to this contest!But I am not a girl ;)
•  » » 8 months ago, # ^ |   +1 Me too. It's great but seems not to have more stories :(
•  » » 8 months ago, # ^ |   0 Hello My Little friend
 » 8 months ago, # |   -43 when a newbie like me see a contest has 5 problems, Oh no this means I will only solve 1 or 2 maximum :/
•  » » 8 months ago, # ^ |   +176
•  » » 8 months ago, # ^ |   -8 how to hug ur comment?
•  » » » 8 months ago, # ^ | ← Rev. 2 →   -16 XD
 » 8 months ago, # |   0 This cartoon is interesting and I hope the problems are short and interesting too!
•  » » 8 months ago, # ^ |   -16 I think the problem will be a big surprise! Let's hope :)
 » 8 months ago, # |   -34 As a participant , give me contribution .
•  » » 8 months ago, # ^ |   +14 UPD :(
•  » » 8 months ago, # ^ |   -33 I don't deserve upvotes for above comment, please downvote me.
•  » » » 8 months ago, # ^ |   -19 Trick to get upvotes isn't it?
 » 8 months ago, # |   0 What are all the possibilities when a contest submission gets "Skipped" ?
•  » » 8 months ago, # ^ |   0 All possibilities except when no one cheats.
•  » » » 8 months ago, # ^ |   0 So if we ensure no one takes my code, it won't get skipped, is it?
•  » » » » 8 months ago, # ^ |   +3 Yes, avoid using online IDEs like ideone, because if you forget to make the code private by any chance, anybody can access it. Also, you mustn't intentionally give your code to anyone.
•  » » » » » 8 months ago, # ^ |   0 But how can anybody get ideone public links? The person has to share the link right?
•  » » » » » » 8 months ago, # ^ |   0 No, I guess it's available on the site only, something like recent public actions is available there. Actually it happened to me one time when I started CP and used ideone then. In a Codechef Lunchtime, after someday I got an email that my submission got plagiarised due to same code matching with 2 other person's submissions. When I took a look at their codes, their codes were clearly my code with some added unnecessary comments. At that time I came to know about this ideone public access thing.
•  » » » » » » » 8 months ago, # ^ |   +13 Currently, Ideone has removed the pubic link of recent submissions which may lead to a decrease in cheating on CP platforms via ideone.
•  » » » » » » » » 8 months ago, # ^ |   0 Ohh, I didn't know about that. Haven't used ideone for the last 4-5 months. Nice to hear it though.
•  » » 8 months ago, # ^ |   0 If your code matches with anyone...if you copy from other or someone copy from you...both of you guys's submissions will be skipped :3
 » 8 months ago, # |   +4 Is series is available in YouTube :-)
 » 8 months ago, # |   +60 Typo: Pinkie Pie is not Pinky Pie.Also that's a good theme! (I am a brony)
•  » » 8 months ago, # ^ |   +43 omg, I'm sorry... I fixed it by the way.
 » 8 months ago, # |   -22
•  » » 8 months ago, # ^ | ← Rev. 2 →   +1 I like how people think memes will gain upvotes. THE MEMES HAVE TO BE QUALITY!!!
•  » » » 8 months ago, # ^ |   -18 quality is a noun :v
•  » » » » 8 months ago, # ^ |   +5 Grammar...nah.
 » 8 months ago, # |   +57 AlFlen If possible can you guys please add some kind of divider between the fairy tale and the problem statement so that people who are only interested in the problem statement can directly jump into it? no offense just a suggestion
•  » » 8 months ago, # ^ |   +78 We tried to make statements rather short. The legend doesn't occupy a noticeable part of statements so I think it'll be comfortable enough for you to read and understand them.
•  » » » 8 months ago, # ^ |   +3 Thanks for a prompt reply!
•  » » » 8 months ago, # ^ |   +22 LOL
•  » » » 8 months ago, # ^ |   +3 Well, that like semi worked.
•  » » » 8 months ago, # ^ |   +3 Thanks for making the statements really very short.Never seen statements shorter than this.
•  » » » 8 months ago, # ^ |   -6 I think your problem statement was too small that I was unable to see them, I have to zoom 10000% my chrome. Thanks for ultra-max-pro-short-statement-contest.
•  » » » 8 months ago, # ^ |   0 Codswallop !
 » 8 months ago, # |   -15 one of which has two subtasks. That's interesting !!
 » 8 months ago, # |   +51 The second pony from the left does codeforces rounds :GWagnwChinoWoah:Orz
•  » » 8 months ago, # ^ |   +5 HEllO
 » 8 months ago, # |   +3 i dont like pony
 » 8 months ago, # |   0 Hope it will be queue free contest..
•  » » 8 months ago, # ^ |   +8 Yeah, we don't want the system to stall.
 » 8 months ago, # |   +57 My daughter loves My Little Pony, she should take care of this round...
•  » » 8 months ago, # ^ |   +41 Parents are doing codeforces nowadays. Damn! Thats why I love codeforces
•  » » » 8 months ago, # ^ | ← Rev. 2 →   +5 from 5th standard Russian students to parents, from newbie to world top coders, you will get each category on codeforces. That makes competition more interesting.
 » 8 months ago, # | ← Rev. 3 →   0 Pony in so many colors
 » 8 months ago, # |   +23 Hi ainta!
•  » » 8 months ago, # ^ |   +214 As a testers, I'm not a tester :)
•  » » » 8 months ago, # ^ |   0 That makes me emotional
 » 8 months ago, # |   +69 To my disgust, I actually thought those ponies were standing on two of thier legs and I wondered what that third thing was.. figured it out now.
•  » » 8 months ago, # ^ |   +14 I cant unsee it, it will haunt my dreams forever
 » 8 months ago, # |   +1 I now must watch my little pony now to try to get a better score on this contest.
 » 8 months ago, # |   +14 Woahh, it's so cute <3
 » 8 months ago, # |   -8 Hopefully, there are no huge pony background problem statements.
 » 8 months ago, # |   +23 NERD_MAX = Helping My Little Ponies on CF.
 » 8 months ago, # |   0 Oh god unfortunately I cannot participate in this My Little Pony round because something has come up. How do I unregister from a contest? I can't find it.
•  » » 8 months ago, # ^ |   0 Go to the number of participants link beside the contest and click it. There will be a cross symbol beside your name. Just click on it. Moreover, you can also not submit anything during the contest. It won't affect anything.
 » 8 months ago, # |   +52 weird flex but ok
•  » » 8 months ago, # ^ |   +18 rotavirus is weird but fine
 » 8 months ago, # |   +2 Never watched My Little Pony animated series but the contest seems interesting!!
 » 8 months ago, # |   +8 Behind this cuteness, I believe there will be some dangerous problems. Best wishes to everyone. Go and be high rated ;)
•  » » 8 months ago, # ^ |   +9 ofc there will be some dangerous problems if problemsetter is severe highschool girl from Chelyabinsk
 » 8 months ago, # |   0 bronies everywhere...XD
 » 8 months ago, # |   0 Will I be able to finally get my colour?
 » 8 months ago, # |   +57 wow, a second My Little Pony contest since Codeforces Round #259 (Div. 1)!
•  » » 8 months ago, # ^ | ← Rev. 2 →   +18 And now I am super excited to help these little ponies. Aren't you guys?
•  » » 8 months ago, # ^ |   +21 Great, yet another Pony Round!
 » 8 months ago, # | ← Rev. 3 →   -8 Expecting a problem statement be likeOne of the pony has crush on author. But he/she doesn't know which one. Help him in finding it out. XD
 » 8 months ago, # |   0 I didn't see Rust in the registration email. Is that a mistake or is Rust really not available for this round ?
 » 8 months ago, # |   +7 What are the things hanging between the legs of the ponys'?
•  » » 8 months ago, # ^ |   +21 other legs of ponies
 » 8 months ago, # |   0 I didn't know sparkle is one of the main ponies. Thank you for this round, I'll be waiting for some nice puns.
 » 8 months ago, # |   0 Wow!
 » 8 months ago, # |   0 The background looks so...cute?
 » 8 months ago, # |   -13 BINOD
 » 8 months ago, # |   +34 Finally... a perfect excuse to join a rated round after nearly two years!Oh, it's Div. 2 only...
•  » » 8 months ago, # ^ |   0 Hello my friend
 » 8 months ago, # |   +14 As a pony , I'll participate :)
•  » » 8 months ago, # ^ |   0 Together for this cause
 » 8 months ago, # |   0 when will codeforces support swift language? Sadlly, So many languages have been added to codeforces but not swift. Swift is really a elegent, efficent modern language! Hope administrator support swift someday!
•  » » 8 months ago, # ^ | ← Rev. 2 →   +7 when will codeforces support asm language? Sadlly, So many languages have been added to codeforces but not asm. asm is really a elegent, efficent modern language! Hope administrator support asm someday!
 » 8 months ago, # | ← Rev. 2 →   +35 Are problems have been prepared on ponygon?
•  » » 8 months ago, # ^ | ← Rev. 3 →   -43 No, on Russian and English
 » 8 months ago, # |   0 Participating in this round while I have an exam tomorrow feels like suiciding
•  » » 8 months ago, # ^ |   +1 Well, it's your 189th. Your are clearly addicted.
 » 8 months ago, # |   +3
•  » » 8 months ago, # ^ |   0 A lot of thanks broh, now I can waste my next weeks n weeks watching them <3 =D
 » 8 months ago, # |   -11 I am scared, I am noob and don't want my ratings to fall now.
•  » » 8 months ago, # ^ | ← Rev. 2 →   +1 Why worry? If ur rating drops, next time it'll be easier to raise them, never worry about that when participating in a contest.
•  » » » 8 months ago, # ^ |   0 trueee
•  » » » 8 months ago, # ^ |   0 I always suck in Div 2 contests, my moral goes down everytime :-(
•  » » » » 8 months ago, # ^ |   0 u give only 1 contest and u are saying this
•  » » 8 months ago, # ^ | ← Rev. 2 →   -8 fuck ratings , love codeforces
 » 8 months ago, # | ← Rev. 2 →   -11 are ponies female?
 » 8 months ago, # |   +3 Finally scrolling through a comment section where you can actually read the comments.
 » 8 months ago, # |   0 GL HF
 » 8 months ago, # |   +22 Hey! Hello? Am I on the blogpost?Well, guess what?Yes, I am! And that's Awesome!Problems setters, Pinkie loves you sooooooo much, too much that I want to throw a party!
 » 8 months ago, # |   +93 Ready for contest!
 » 8 months ago, # |   +128 I hate the story of problems! :(
•  » » 8 months ago, # ^ |   -11 For real...
•  » » 8 months ago, # ^ |   +40 This endless blah blah apple here flutterapple cakeapple there because fluttepie with cakeflutter there is only annoying. This is no fun.
•  » » 8 months ago, # ^ |   +10 Yup the cringe level was just off the charts!
 » 8 months ago, # |   +20 No offence to problem setters ,but i am unable to understand the question itself.
 » 8 months ago, # |   +21 wtf the statements say?)
 » 8 months ago, # |   +27 Horrible statements. I couldn't even understand what was asked.
 » 8 months ago, # |   -19 going to sleep after reading your story :(
 » 8 months ago, # |   -9 Can I get my ratings back by nothing playing this round :(
•  » » 8 months ago, # ^ |   0 Yeah!! If you haven't submitted your solution even a single time, then you can leave the contest. There will be no change in your ratings!!
 » 8 months ago, # |   +48 Is it an English Comprehension Contest?
 » 8 months ago, # |   +67 Are we here to code or improve our vocabulary.Seems like its and Mock IELTS/TOEFL Tests.
•  » » 8 months ago, # ^ |   +17 Even they have to make 2 announcements for writing the correct question!! But till now I am unable to understand what they are trying to convey in the first question.
•  » » » 8 months ago, # ^ |   +3 yea same with me...i cant understand how are the blocks kept..
•  » » » 8 months ago, # ^ |   0 yeah even i guessed about the question and solved according to that
 » 8 months ago, # |   +41 Poor statements!! I am unable to understand even the first question !!
 » 8 months ago, # |   +24 There was no need to have a sooooooo long story, it would be better to have a more mathematical statement than a confusing long story.
 » 8 months ago, # |   +26 The names of the characters were so complicated to keep track off and the long stories. Sorry but not a good contest.
 » 8 months ago, # |   +123 lmao
•  » » 8 months ago, # ^ |   +4 This isn't meant to offend anybody, I just posted it to make this very clear that problem statement is where one should give more time then framing story. No doubt problem statement could be better
 » 8 months ago, # |   0 This was just waste of time.... The problem statements were so confusing. Actually this contest was not of coding but english.
 » 8 months ago, # |   +38 I dont care how pinky pie eats her patty cakes just tell me what I have to code for!
 » 8 months ago, # | ← Rev. 2 →   -16 I hate the story of problems! :(
 » 8 months ago, # |   +12 Not able to understand even first problem!
•  » » 8 months ago, # ^ |   0 Same here
 » 8 months ago, # |   +54 The statements should be simple. There is no need to always introduce a story in the problem. I am very disappointed after this contest.
 » 8 months ago, # |   +25 Why the f*** do I have to see these DISGUSTING PONIES.
 » 8 months ago, # |   +56 Why the fuck you want to include stories in problems, and these weird names- Rainbow dash, Flutter shy..... What do you think, by including stories, the round becomes interesting??
 » 8 months ago, # |   +59 no more storyforces
 » 8 months ago, # |   +92 How did all of the contest setters agreed to release these kind of statements?
 » 8 months ago, # |   +46 Too much storytellings... Just give us simple statements please...
 » 8 months ago, # |   +27 Contest in a nutshell: Read the stories and fall asleep. Setters be like.. Didn't understand the question? We did not want you to.
 » 8 months ago, # |   +17 I don't like pony stories anymore.
 » 8 months ago, # |   +31 It's really not that hard to write clear, concise statements.
 » 8 months ago, # |   +32 It took so much time to understand problem A :-(
 » 8 months ago, # | ← Rev. 2 →   -6 Really cool statement! It saved me 2 hours by disgusting pony stories in problem A!
 » 8 months ago, # |   -15 We wish you good luck and high rating!Did you mean "Wish you bad luck and low rating"?
 » 8 months ago, # |   +26 To the guy who designed the problem statements: Hats off! You've a tendency to play around with words and over-complicate easy to understand sentences.
•  » » 8 months ago, # ^ |   -29 only girls have this ability bro....
»
8 months ago, # |
-20

### When the Contest seems to be Out of your League

 » 8 months ago, # |   +19 I planned to watch My Little Pony when I was reading the announcement, but after this contest, I would say no.
 » 8 months ago, # | ← Rev. 2 →   -23 How to solve A after the contest?
•  » » 8 months ago, # ^ |   +17 Do not discuss problems while contest is running.
•  » » » 8 months ago, # ^ |   +13 Yes, I know. I edited the comment now.
•  » » » » 8 months ago, # ^ |   +15 clever
•  » » 8 months ago, # ^ |   +3 n/2 + 1
•  » » » 8 months ago, # ^ |   0 How?
•  » » » » 8 months ago, # ^ |   0 make an exemple for n=4 and n=5 on the paper.In the first step you can color the "1st layer" (near the border). In the second step the second layer and so on.In the n/2th step you will reach the mid layer (+1 for the center).
 » 8 months ago, # |   +120 Am I taking an English examination?
 » 8 months ago, # |   +190 The statements are too long and there are too many unnecessary(as I think) stories.And there was even a typo in the statement of problem B. As you can see in the picture below, the two phrase "After the sixth event" came out incorrectly as "After the second event"(Only true for the latter). Although the typo was fixed after a while, there wasn't announcement about this. Moreover, I posted the comment similar to this about 1.5h before, but after about an hour, the comment was deleted for an unknown reason.Why couldn't no one find the typo before the contest? Why there wasn't announcement about the typo? And why my previous comment disappeared? Not pretty good. :(
 » 8 months ago, # |   +23 This round tested our English rather than our programming skills.
 » 8 months ago, # |   0 Just asking. Are the top rankers(in this round) even trying problem E1 lol
•  » » 8 months ago, # ^ |   0 I have tried very hard on E1 and nearly burned my brain
 » 8 months ago, # | ← Rev. 2 →   +46 Now I got a reason to hate pony.
•  » » 8 months ago, # ^ |   +8 This is the reason I don't upvote before round.....LOL
•  » » 8 months ago, # ^ |   +1 Exactly
 » 8 months ago, # |   -8 quite difficult no? ':)but i liked the mlp theme!
 » 8 months ago, # | ← Rev. 2 →   +7 Was I the only one who found C way easier than B (At least on the implementation side)?
•  » » 8 months ago, # ^ |   +17 For me the number of unpronounceable word in statements defines the hardness of problem.
 » 8 months ago, # |   +17 Enough grid construction and heavy weight english word exercise for today. I quit.
 » 8 months ago, # |   -9 good contest!
 » 8 months ago, # |   0 How to solve D?
•  » » 8 months ago, # ^ |   0
•  » » 8 months ago, # ^ | ← Rev. 2 →   +44 Let $dp[i][j]$ denote the size of the largest rhombus with the bottom vertex located at $(i, j)$. Suppose the colours at $(i, j)$, $(i - 1, j - 1)$, $(i - 1, j)$ and $(i - 1, j + 1)$ are all the same, $dp[i][j] = min(dp[i - 1][j - 1], dp[i - 1][j], dp[i - 1][j + 1])$ + (1 if the vertex opposite to $(i, j)$ has the same colour as $(i, j)$)If the colours are not the same, $dp[i][j] = 1$Now, just iterate over all bottom vertices $(i, j)$ and count the number of rhombuses using the dp values.
•  » » » 8 months ago, # ^ |   +8 Wow, never got the idea using 1 dp. I got idea using 4 arrays. up, down, right, left.
•  » » » » 8 months ago, # ^ |   +3 Recently watched a video of largest square in grid, and applied the same idea here
•  » » » » » 8 months ago, # ^ |   0 Pretty nice trick :)
 » 8 months ago, # |   +17 Why the fuck memory limit on D is 256 MB
•  » » 8 months ago, # ^ |   +31 Because $30$ MB is enough.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 A dp from every corner so 4 matrix of 2000*2000 ? P.S. that s 4*16 mb so nevermind
•  » » » » 8 months ago, # ^ |   0 only 2 dp arrays are enough! from the upper and the lower side.
•  » » » » » 8 months ago, # ^ |   +3 only 1 dp array will also do the trick. Just take the minimum in second pass.
•  » » » » » » 8 months ago, # ^ |   0 Waiting for more.
•  » » » » » » 8 months ago, # ^ |   0 Yeah got the idea now! :)
•  » » 8 months ago, # ^ |   0 I thought 256 MB is a normal memory limit?
•  » » 8 months ago, # ^ |   0 No clue, but you can code the same solution by just considering for each character one at a time, doesn't change total time complexity anyway if you were planning on storing pref[26][n][m] or something similar.
•  » » 8 months ago, # ^ |   +3 I agree. That and the tight time limit cost me a good 150 points and 20 minutes and it must have cost others points too. The constraints were way too tight.
•  » » » 8 months ago, # ^ |   0 I have O(n * m * k) sol, where k is alphabet, and I'm getting TLE. Perhaps it was supposed to stop rotation or even force O(n * m), but seems v tight for little reason.
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 I had done using only 2 2D array(one for input and other for DP). So, size is 2*2000*2000*4 bytes = 32MB.
 » 8 months ago, # |   +10 Can somebody tell me the idea behind problem C? I tried like everything. Thanks in advance!
•  » » 8 months ago, # ^ | ← Rev. 2 →   +1 Apply Binary Search MySolution
•  » » » 8 months ago, # ^ |   0 Thanks, I will look to understand how it was thought.
•  » » 8 months ago, # ^ | ← Rev. 2 →   +7 the answer will depend on the maximum frequency of a number and count of maximum frequency. To notice that see that if max freq is 3 , it occurs twice , you can make ab...ab...ab , now just from this you can notice that ans would be (n-(mx)-(cnt-1))/(mx-1), as you need cnt — 1 spaces from the end and to populate mx freq you need mx spaces , out of remaining spaces you need to partition it in mx-1 segments like ab...ab...ab , which is optimal when we divide them equally or just division. Link — my solution
•  » » » 8 months ago, # ^ |   0 but why only max frequency is considered?
•  » » » » 8 months ago, # ^ |   +1 because numbers having frequency lesser than maximum frequency can always be adjusted in the middle without lessening min distance
•  » » » » 8 months ago, # ^ |   0 Because for other frequency we can insert them in empty spaces between those of max frequency and they won't come out of the array because they are strictly less than max, for ex — if 3 , 2 ,2 ,1 is freq array and numbers for them is a,b,c,d then there are 3 a's , we want maximize their separation first, so we equidistantly place them , so a...a..a, Now every value has freq<=2, which can be placed in each of empty spaces between these a's, so their min distance won't decreas
•  » » » 8 months ago, # ^ |   0 I did the same.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 I used binary search to look for the solution. My solution passed the pretests but gave WA on test 43. I don't know where did I go wrong. Link to my solution: https://codeforces.com/submissions/i_m_eshaan17# Can you please see what thing I missed out
•  » » » 8 months ago, # ^ |   0 Wow. Nice Solution.
•  » » 8 months ago, # ^ | ← Rev. 4 →   0 Look u have to find frequency of the number occuring most number of times. now find total how many numbers are there having this frequency int val=n-maximum_frequency-(count of numbers having maximum frequency -1) val/(maximum_frequency-1) will give the right answer .Let us see this with 2 different examples {1,2,3,1,2,5,1,2,8,1} Here the maximum frequency is 4 and the number having this frequency is 1 so we can see answer will be 2 Now lets take change the example a bit {1,2,2,1,2,5,1,2,8,1} Here the maximum frequency is 4 and the numbers having this frequency are 1 and 2 so now you can see the answer becomes 1 {1,2,1,2,5,1,2,8,1,2} can be one solution reason is that 1 has maximum frequency so we arrange array like 1....1....1...1 we put 1 at both ends to maximize the distance and put other elements between 1s but when 2 also has frequency 4, two 2s will start falling between two 1s(something like 1,2,2,1.... So,every time we encounter another number having maximum frequency we need to put it at last (something like {1,2,1,2,5,1,2,8,1,2}) Look at the first test case for a bit of clarification
 » 8 months ago, # |   +5 Was it just me or did others find the wording of the first question a bit difficult as well?
•  » » 8 months ago, # ^ |   0 Me too. I spent more than 1 hour just going through the statement "each newly placed block must touch the built on the previous turns figure by a side" before understanding what it really meant.
 » 8 months ago, # |   +51 Today I get to know why we were taught English first then programming.Though the concept and problem idea is good, I suggest the Problem statements can be used for essay writing competitions.
 » 8 months ago, # |   +8 I'm doubting my English skill after this contest
 » 8 months ago, # |   +4 I solved C and still can't understand A
•  » » 8 months ago, # ^ |   +6 I made upto 6 X 6 grids to understand the common pattern between them xD
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 Explanation Red is first step, blue is second, green is third...upd: Its wrong
•  » » » 8 months ago, # ^ | ← Rev. 2 →   0 for a 6x6 grid example$first: \\ 101010\\ 000001\\ 100000\\ 000001\\ 100000\\ 010101\\$ $second: \\ 121212\\ 202021\\ 120002\\ 200021\\ 120202\\ 212121\\$ $third: \\121212\\ 232321\\ 123032\\ 230321\\ 123232\\ 212121\\$ $last: \\121212\\ 232321\\ 123432\\ 234321\\ 123232\\ 212121\\$1,3 in blue and 2,4 in yellow
•  » » 8 months ago, # ^ |   0 For the 4x4 case, 1stB * B * * * * B B * * * * B * B  2ndB Y B Y Y * Y B B Y * Y Y B Y B  3rdB Y B Y Y B Y B B Y B Y Y B Y B Basically, if f(n) steps are needed for an n x n grid, f(n) = 1 + f(n-2)
•  » » » 8 months ago, # ^ |   0 Can you explain your first step please.
•  » » » » 8 months ago, # ^ |   0 I started filling the colors from the outer edges since an outline border was already built.
 » 8 months ago, # |   +28 what is the pretest 5 of problem D?
•  » » 8 months ago, # ^ |   0 Pretest 5 cost me 2 WA, but it was my silly mistakes...
•  » » 8 months ago, # ^ |   +3 Try this: 4 5 aaaaa aaaaa aaaaa aaaaa 
•  » » » 8 months ago, # ^ |   +3 The correct answer for that pretest is 26, right?Thats what my code is printing as well.
•  » » » » 8 months ago, # ^ |   +3 I was able to fix my code for that problem.For those wondering, the pretest I used was tc6 5 aaaaa aaaaa baaab bbabb bbbbb bbbbb However I believe maksio's test should provide an error as well. The only change needed is change it to a 5 * 5 matrix of a's
•  » » 8 months ago, # ^ |   +3 I see you have done DP similar to me too. The issue in your code seems to be that you are wrong in up and down dp. You can see my code, bam is similar to left, dan is similar to right, up is dp1, down is dp2.Basically, c should be updated as 1+2*min(bam, dan) and and d should be up[i+1][j]+2, not 1.
 » 8 months ago, # |   -18 Bye Bye rating
 » 8 months ago, # | ← Rev. 2 →   +25 The problems were good but the wording of problem A messed up my tempo. Also the names of the characters (i assume names of ponies ) confused more from understanding the problem statement. I would recommand using some common and familiar english names.
 » 8 months ago, # | ← Rev. 8 →   -70 No comment
•  » » 8 months ago, # ^ | ← Rev. 2 →   +25 .
•  » » » 8 months ago, # ^ |   -11 Look she has a rating which is much higher than mine and I am gonna get about +120 after this round but seriously this contest could have been better and what the fuck are you even talking about
 » 8 months ago, # |   +26 She confused the contest with the storybook
 » 8 months ago, # |   +40 You can choose to become a writer rather than a contest designer
 » 8 months ago, # |   0 What is the correct approach for C??
•  » » 8 months ago, # ^ |   0 bsearch answer, then for each iteration, always greedily put down the number with the largest remaining frequency that is available.
•  » » » 8 months ago, # ^ |   0 Can you please, share your check function?
•  » » » » 8 months ago, # ^ |   0
•  » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 Where my check may fail Spoilervector v is vector of frequencies of every element that appears more than once bool check(int mid, vector &v){ mid++; vector used(n+1); int now = 0, i = 0; for(auto x : v){ if(used[now])return false; used[now] = true; i=now; for(int j=1;j=n||used[i+mid] == true)return false; else { i+=mid; used[i] = true; } }now++; } return true; } 89275212
•  » » » » » 8 months ago, # ^ |   0 can you plz plz check this function https://codeforces.com/contest/1393/submission/89275288 Spoilerbool go(int k){ set s; rep(i,0,n) s.insert(i); for(int i:v){ int p=*s.begin(); s.erase(p); int tot=i-1; while(tot--){ auto l=s.upper_bound(p+k); if(l==s.end()) return 0; s.erase(l); p=*l; } } return 1; } 
•  » » » » » 8 months ago, # ^ |   0 can you please explain the logic?
•  » » » 8 months ago, # ^ |   0 no need to use bs :v
•  » » » » 8 months ago, # ^ |   0 i mean sure, but for me it was easy to see a bsearch solution, and it fit in the TL.
•  » » 8 months ago, # ^ |   +15 My approach:Count the frequencies of each unique element.Note that if there are multiple most frequent elements, you can discard all but one unique element. If both 1 and 2 appear as frequently as possible, you can just do 1 2 .. 1 2 .. 1 2. This reliably increases the distance between alike elements by 1.Note that the optimal arrangement for the most frequent element will always be 1 .. 1 .. 1 where 1 is the most frequent element, and you fill things in the middle.All remaining elements can be inserted into the ... spaces in some way (proof is left as an exercise). So we just count the number of how many things there are that aren't the most frequent, and divide by the number of spaces (the ...).
•  » » » 8 months ago, # ^ |   0 What if the input is 112233. Optimum distance is 2 and it is achieved with 123123. But if we start with 1....1, then we can't get distance 2 anymore. The possible ways to fill the middle are 2233, 2323, 2332, 3223, 3232 and 3322, but they all fail.
•  » » » » 8 months ago, # ^ | ← Rev. 3 →   +1 I mention that in the earlier case -- because they're all the max frequency, we can treat 1 2 3 ... 1 2 3 ... 1 2 3 like 1 ... 1 ... 1 and just add 2 to our final answer.You only need to fill things in the middle if their frequency is lower than the maximum, if they are the maximum you can handle them earlier.Final answer is the sum of all frequencies $< maxfreq$, divided by $maxfreq - 1$, plus the number of unique elements whose frequency is $maxfreq$, minus $1$.
•  » » 8 months ago, # ^ |   0 Binary search
 » 8 months ago, # | ← Rev. 7 →   +3 Codeforces be like lets have a new member in the family : PonytaleForces !
 » 8 months ago, # |   +42 storyforces
 » 8 months ago, # |   0 Lol what the heck was this contest
•  » » 8 months ago, # ^ |   +3 It was a english grammer contest,this contest increased my english reading skills :XD
 » 8 months ago, # |   0 what's the idea in problem C
 » 8 months ago, # |   -6 Kindergarten question designer is better for you
 » 8 months ago, # |   +99
 » 8 months ago, # | ← Rev. 2 →   +10 I saw this coming thats why I tried confirming it here , looks like they were joking back then.
•  » » 8 months ago, # ^ |   +4 !
•  » » » 8 months ago, # ^ |   0 Seriously, they couldn't have given a more ironical reply
 » 8 months ago, # |   +3 Write stories if you want, but please at least give us formal definitions for the operations to be performed.
 » 8 months ago, # |   0 What is the approach to solve D?
•  » » 8 months ago, # ^ |   0 for each cell we calculate the number of ways to form a pattern with center is the cell.
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 $up_{i,j}$ = Number of cell with same color above this cell$dn_{i,j}$ = Number of cell with same color below this cell$a_{i,j}$ = $min(up_{i,j},dn_{i,j})$$b_{i,j}$ = max size of left half of a rhombus centered in this cell$c_{i,j}$ = max size of right half of a rhombus centered in this cell$m_{i,j}$ = $min(b_{i,j},c_{i,j})$ = max size of a rhombus centered in this cell$ans$ = sum of all $m_{i,j}$
•  » »