### physics0523's blog

By physics0523, history, 4 months ago,

Codeforcesの皆さん、こんにちは!(Hello, Codeforces!)

I'm glad to invite you to my first contest, Codeforces Round #654 (Div. 2) which will be held on Jul/01/2020 16:35 (Moscow time) (notice earlier time than usual). All of the problems were mainly written and prepared by me. The round is rated if your rating is strictly less than 2100.

You will be given 6 problems (one problem has a subtask) and 2 hours to solve them. Please, read all the problems.

I would really like to thank:

The scoring distribution will be announced later.

Good luck, have fun and wish your high ratings :)

UPD: Scoring distribution : $500 - 1000 - 1250 - 1500 - (1500 + 1250) - 3000$

UPD: Editorial is out

• +732

 » 4 months ago, # |   +2 Auto comment: topic has been updated by physics0523 (previous revision, new revision, compare).
 » 4 months ago, # |   +28 Thanks for all of these frequent rounds!
 » 4 months ago, # |   +137 I hate Physics. Hopefully no problem related to physics!
•  » » 4 months ago, # ^ |   -10 Oh god, you read me! I'm afraid of this.
•  » » 4 months ago, # ^ |   +14 Even though I love Physics , I still hope there will be no physics related problems. XD.
•  » » 4 months ago, # ^ |   +1 same here pal.XD
•  » » 4 months ago, # ^ |   +19 I think Physics problems would be easier than the problems in this round
 » 4 months ago, # |   +6 Good luck on your maiden round!
 » 4 months ago, # |   +61 As a tester, I can say that the problems are really interesting and hopefully you will enjoy solving them :)
•  » » 4 months ago, # ^ |   -273 I dont know why testers are commenting a lot just for upvotes!? The only thing you done is you participated in a contest few days before most of the people and i dont see anything special to upvote u!
•  » » » 4 months ago, # ^ |   +569 The only thing you done is you participated in a contest few days before most of the people and i dont see anything special to upvote Nah this isn't the only special thing about testers.He also left one rated contest so that others can enjoy one round.
•  » » » 4 months ago, # ^ | ← Rev. 3 →   +251 Down voted, it's not true about many testers, you can't even understand how hard being a good tester is.P.S. I feel personally attacked. =(
•  » » » » 4 months ago, # ^ |   -285 Oh my god! Ok i upvoted you becuase its the only thing you want :( and its you third time you are editing your comment to dont get downvote!
•  » » » » » 4 months ago, # ^ | ← Rev. 2 →   +240 What is wrong with you, I want you to understand how important testers are, some of testers duties are : They should try submitting heuristics/wrong solutions, to make sure tests are strong enough. They should help problem setters to replace the problems if needed. They should write many different solutions for a single problem(if needed), to make sure unintended solutions that are wrong or are slow wont pass. Doing many other things to make sure tests are strong, problems are not spoiled, statements are clear, pretests are fine and etc. I saw that your comment has many upvotes, so it probably means many people don't know about testers, so I wrote this to show you how being a good tester is , not for upvotes.P.S. I enjoy editing my comments, you cant blame me for that.
•  » » » » » » 4 months ago, # ^ |   -259 Upvoted as i said
•  » » » » » » » 4 months ago, # ^ |   +87 Thanks for upvoting. :)
•  » » » » » » 4 months ago, # ^ | ← Rev. 2 →   +45 Agreed. A good contest is the result of hardwork and collaboration of all testers, problem setters and coordinators.I would like to thank all of you for making so many good contests for us.Hope to have fun in this contest too:)All the best to all!
•  » » » 4 months ago, # ^ |   +229 As a tester, I can confirm that we do absolutely nothing in a grand conspiracy to gain contribution points by making meaningless confirmations on the contest announcement.
•  » » » » 4 months ago, # ^ |   -21
•  » » » » 4 months ago, # ^ |   +35 As a non-tester who would very much like to become one, how can I get in on this conspiracy?
•  » » » » » 4 months ago, # ^ |   +11 Just pretend you're a tester in the comment section, then they'll add you to the tester list in the announcement.
•  » » » » 4 months ago, # ^ |   +20 I love it when people compose formal responses to jokes.
•  » » 4 months ago, # ^ |   +33 this is what all testers say about their rounds:))
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +10 Wait for the next Global round. :)For spoilers about tester comments of next Global join AC.
•  » » 4 months ago, # ^ |   +107 Scam
•  » » 4 months ago, # ^ |   +50 Proof of a conspiracy theory by testers to gain contribution.
•  » » 4 months ago, # ^ |   +48 Frequent comments like these is why nobody takes such comments seriously now! If you found the questions interesting, you are clearly lying and spamming for contribution. As simple as that.
•  » » » 4 months ago, # ^ |   +30 Or maybe they simply should be banned of the tester position as they have a much different taste for problems than the CodeForces community does.
•  » » 4 months ago, # ^ |   0 Did some comments disappear? I think I saw few other replies to this comment yesterday.
•  » » » 4 months ago, # ^ |   0 Yes, lewser's reply disappeared, and all of the replies to it with it.
•  » » » » 4 months ago, # ^ | ← Rev. 4 →   0 Do you think this is intentional or some other bug in the Codeforces website?
•  » » » » » 4 months ago, # ^ |   +6 Probably intentional.
•  » » » » » 4 months ago, # ^ |   0 Yes,It's intentional..After many negative vote some commment filter out.I think this feature added from past 2 contest ..I think it's a good initiative.
•  » » » 4 months ago, # ^ |   +16 Yes. They tried to silence me revealing the secrets about the tester-contribution conspiracy.
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   +9 Hi i forgot to reply your message when my comments was there. you replied me that you and lots of testers didnt do it! And im gonna say yes! I agree and i was saying some of them are doing it in every single contest and i was replied to tester i think that its not fair! I dont realy care about upvotes and downvites i just say something that i believe so im sory if any one get mad at me becuase if those comments but im saying that these kind of works are not cool :(
•  » » » » » 4 months ago, # ^ |   0 some of them are doing it in every single contest I agree with that, but I'm not one of them, I joke about those things sometimes, but I really don't mind.
•  » » 4 months ago, # ^ |   +58 Codeforces should have option of downvoting comment even after upvoting it.
•  » » » 4 months ago, # ^ |   -14 You can still downvote the comment next to that one.
 » 4 months ago, # |   +209 I was master when I tested the round, I wouldn't have done it if I knew I would have missed such a great round :((
•  » » 4 months ago, # ^ |   +3 Great round????
•  » » 4 months ago, # ^ |   -8 scam
•  » » 4 months ago, # ^ |   +11 xD
 » 4 months ago, # |   0 What is the meaning of subtask? Does this mean a problem will have an easy and a hard version?
•  » » 4 months ago, # ^ |   +99 Yes
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +3 So are the 6 problems inclusive of the subtask (meaning there are actually only 5 distinct questions)or does it make it 7 to solve totally?
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   +91 Should i know that? :/
•  » » » » » 4 months ago, # ^ |   +14 Sorry, for some reason I just assumed you were a tester.
•  » » » » 4 months ago, # ^ |   +65 the latter one :)
•  » » » » 4 months ago, # ^ |   +99 6 distinct problems
 » 4 months ago, # |   +64 Glad not seeing comment section filled with memes this time
•  » » 4 months ago, # ^ |   -21 May be someone is still trying to make new memes! :)
 » 4 months ago, # | ← Rev. 5 →   -57 Good luck everyone. This community is insane lol
•  » » 4 months ago, # ^ |   +22 Here I was wondering why there were so many negative feedbacks until I saw the revision history XD
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 I just said I loved physics and people got offended, so had to change. I still don't know the reason
•  » » » » 4 months ago, # ^ |   0 Nobody's got offended, and nobody cares whether you love physics or hate it.
•  » » » » 4 months ago, # ^ |   0 Its not necessarily that people are offended. They might not agree with your opinion and hence the negative feedback.
 » 4 months ago, # |   +46 頑張って皆！Good luck everyone!
 » 4 months ago, # |   +28 I love Japan and the Japanese so i'm excited for contest :D
•  » » 4 months ago, # ^ |   +11 High possibility of involving anime characters
 » 4 months ago, # |   0 (one problem has a subtask) this seems in-ter-uh-sting
 » 4 months ago, # |   -42 Hope , we will see Geometry related problem.
•  » » 4 months ago, # ^ |   +80 I think you're looking for a negative response!!
•  » » » 4 months ago, # ^ |   +12 Thank you for clarify.
•  » » 4 months ago, # ^ |   +6 Even geometry is better than problem B statement .
•  » » » 4 months ago, # ^ |   0 Exactly!!
 » 4 months ago, # |   0 Looking forward to this round!
 » 4 months ago, # |   +16 Physics is evrywhere :v
•  » » 4 months ago, # ^ |   +13 Not in this contest plz
 » 4 months ago, # |   +3 My UI of codeforces has been shifted to left side and I'm unable to see users and search problems with specific rating, Is there anyone facing the same issue since morning?
•  » » 4 months ago, # ^ |   +12 Try to click on desktop version on bottom of page
•  » » » 4 months ago, # ^ |   +1 Ohhh! thank you for the help.
 » 4 months ago, # |   -75 well all the testers can anyone just give slightest of hints as to what type of problemset is coming our way tommorrow
•  » » 4 months ago, # ^ | ← Rev. 3 →   +5 What do you think their replies would be ...other than "Some Interesting Problems".
•  » » » 4 months ago, # ^ |   -62 but still it would be much better if we get to know type of problems.maybe tiniest of clues
•  » » » » 4 months ago, # ^ |   +8 "maybe tiniest of clues"Idk why.. but this sounds so-fuccin-funny..
•  » » » 4 months ago, # ^ |   0 their*
•  » » 4 months ago, # ^ |   0 Generally testers don't give that kind of hints before contest..
•  » » 4 months ago, # ^ |   +4 Sure. I was a tester. I can tell you. The problems are interesting. Have fun!
•  » » » 4 months ago, # ^ |   0 We knew that.. 2 tester already told that.
•  » » » 4 months ago, # ^ |   -11 sibasish_14 yeah xD
•  » » » » 4 months ago, # ^ |   0 scam
•  » » 4 months ago, # ^ |   +20 I'll give you a hint for the next 100 rounds, I know, even better. You'll see greedy, constructive, more greedy, elementary math, guesswork, and greedy. You only have a chance at an actual cs problem if you can make it to the last problem, otherwise you'll write 20 lines of code since people on a platform called "code"forces do not enjoy coding.
•  » » » 4 months ago, # ^ |   +3 Let me guess, F is your favourite problem in the contest?
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   +7 I'm too dumb to get to it. But I saw by your comment you thought it wasn't great ig :(But i'd rather code 30m for boring problem (though it is probably not boring for me) than not code at all. So probably.
•  » » » 4 months ago, # ^ |   0 Highly disagree. There's a fair amount of regular coding at a regular software engineering job. There are tons of "put a twist on a standard CS algorithm"-type problems on Leetcode.This is the only place with such a high ratio of actual problem solving / lines of code. Let's keep it that way.This contest wasn't the best one, but not because the implementations happened to be short. There are plenty of other contests with problems with similarly short implementations but that were nonetheless elegant and delightful.
•  » » » 4 months ago, # ^ |   +1 I agree not many problems related to Binary Search, Graphs Algorithm etc. nowadays....
 » 4 months ago, # |   -22 is it unrated?
•  » » 4 months ago, # ^ | ← Rev. 3 →   +1 It is rated if your rating is strictly less than 2100 !!
•  » » 4 months ago, # ^ |   0 The answer is both a yes and a no.(Did you read the announcement?)
 » 4 months ago, # |   +9 Dude loves physics so much, he used it as his username, pretty sure some physics related questions,any ways good to have frequent rounds.
•  » » 4 months ago, # ^ |   +1 And if tourist were the problem setter you would expect problems themed around sightseeing tours.
 » 4 months ago, # | ← Rev. 2 →   +51 Add the scoring distribution. If you can solve all the problems in a moment, you'll achieve exactly 10000 pts!Auto comment: topic has been updated by physics0523 (previous revision, new revision, compare).
 » 4 months ago, # |   0 All the best and hoping for a great round!!
 » 4 months ago, # |   +3 Thank you for these frequent contests. we keep on learning and testing our skills it's really helpful
 » 4 months ago, # |   +33 Do we need to practice HC Verma or Irodov?
•  » » 4 months ago, # ^ | ← Rev. 2 →   -42 This Comment is Deleted Due to negative feed back, don't know why but my comments are getting down votes all the time, even though the content of my comments are genuine & accurate. From now on I decide to never give any suggestion to anybody on codeforces in the form of comments , because I may not be intelligent enough to give suggestions to most of you.thanks!
•  » » » 4 months ago, # ^ |   +26 Dude, it is a pun on the problem setter username
•  » » » » 4 months ago, # ^ |   0 It's a joke, not a pun.
 » 4 months ago, # |   +28 I have participated in the writer's contests on another platform (Hackerrank), and his problems are always well-prepared and fun to solve.I believe this round is going to be great as well!
•  » » 4 months ago, # ^ |   +12 Do you have a link to his contest(s) there?
•  » » » 4 months ago, # ^ |   +13 Check This.. it's writer is physics0523 .
•  » » » 4 months ago, # ^ |   +13 Here is the link to his latest contest.Unfortunately problem statements are written only in Japanese, but the problems are like the ones from AtCoder Beginner Contest.
 » 4 months ago, # |   -13 Are the problem statements shorter? physics0523
 » 4 months ago, # |   -12 A contest a day keeps the pressure away.
•  » » 4 months ago, # ^ |   +5 * covid-19
 » 4 months ago, # | ← Rev. 2 →   0 what's the meaning of (1500 + 1250) in scoring distribution for 5th problem ? can't we just write 2750 instead? Thanks in advance !!!
•  » » 4 months ago, # ^ | ← Rev. 2 →   +10 This means there will be 1 problem with two subtasks.
•  » » » 4 months ago, # ^ |   +2 oh.. Now I got it !
 » 4 months ago, # | ← Rev. 2 →   +1 Hope these long queues will be solved as fast as possible. And we will have good contest.And it is solved :) when i returned to submit the problem after writing comment, it was solved.
 » 4 months ago, # |   0 I'm a beginner in CP and became PUPIL in last DIV 3 contest solving 4 problems. Hoping to do well in this contest too. But the problem I'm facing is I'm able to solve A, B in div 2 but on C I always get stuck. So any suggestions how to cover this gap between B and C?
•  » » 4 months ago, # ^ |   -8 I think the only thing you need , is "practice" .I also in your level & stuck on C.
•  » » » 4 months ago, # ^ |   0 Yes, I am practicing a lot. And when I see solutions of C then most of the time I find a new concept which I don't know and then I try to learn that from youtube or from somewhere else.
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   -11 [deleted]
 » 4 months ago, # |   +22 2 hours remaining to start the round. But wrong division cases on Codeforces Round #653 (Div. 3) is not fixed yet. Some experts get their rating changed. Will it be fixed before the round starts?
•  » » 4 months ago, # ^ |   0 Maybe they registered for div3 round before they became expert.So they were not out of competition.
•  » » » 4 months ago, # ^ |   0 Yes i know that. But as far i know mike fixes it manually at the time of rating change.
•  » » 4 months ago, # ^ |   -10 Who cares?! ))
•  » » » 4 months ago, # ^ |   0 Some expert may solve the round carelessly since the round is not rated for him. They might care about unwanted rating change.
 » 4 months ago, # |   -43 making the start 25m later would be perfect!
 » 4 months ago, # |   +13 Hope the contest will be as interesting as the score distribution .
 » 4 months ago, # |   0 I hope in this round "in queue" will not be shown for longer time
 » 4 months ago, # |   0 how can someone become a tester .... i want to experience being a tester
•  » » 4 months ago, # ^ |   +1 Make Ashishgup your friend and then ask him the same.
•  » » » 4 months ago, # ^ |   0 i think he is kinda too busy to this sort of stuff if u know plzz tell me how to be a tester
 » 4 months ago, # |   +2 Hlo Guys. I am new here. What is the meaning of score (1500 + 1250) of 5th question?
•  » » 4 months ago, # ^ |   0 Two subtasks
•  » » » 4 months ago, # ^ |   0 Thanks!
 » 4 months ago, # |   0 Hope to become green
•  » » 4 months ago, # ^ |   +51 Me too
 » 4 months ago, # |   +44 I don't like this round at all...
 » 4 months ago, # |   +78 And why did Akari have to make the E1 problem difficult? She should have kept quiet. Damn these front bench kids!!
 » 4 months ago, # |   -8 yes keep changing time by one hour. Great.
 » 4 months ago, # | ← Rev. 2 →   +91 No offense to the round writers, but problem B needs to be proofread by a native or advanced English speaker.Edit: To clarify, I think the problems are interesting as always, but the phrasing and typos make the problem difficult to read for someone not familiar with the idea of the problem.
•  » » 4 months ago, # ^ |   +9 I was just going to say this. If there are going to be any rounds in English, it is best they are authored properly. FFS!!
•  » » 4 months ago, # ^ |   +5 Russian statement wasn't great either.
 » 4 months ago, # |   +43 Good-bye my rating!
•  » » 4 months ago, # ^ |   +3 Add me to that list. Hell, for all I know I'm gonna become a specialist.
•  » » » 4 months ago, # ^ |   0 Add me too!!
 » 4 months ago, # | ← Rev. 2 →   -72 Very Bad round with 90% maths
•  » » 4 months ago, # ^ |   +116 If you call these problems math, show at least one round which isn't math
•  » » » 4 months ago, # ^ |   -22 that's cause all cf rounds are too math based.
•  » » 4 months ago, # ^ |   +21 The first question was basic arithmetic, we can't complain. 2nd question required you to know sum of first n Natural numbers which was also not any tough maths. C was casework, D was pattern. Why are u complaining?(pls correct me if I'm wrong somewhere)
 » 4 months ago, # |   -37 Mathforces :(
 » 4 months ago, # | ← Rev. 2 →   +57 It seems like I am the only one who liked the contest. ??? Feel free to downvote if you disliked it. IMHO it is a balanced contest and it is not that MathForces as some of you think.
•  » » 4 months ago, # ^ |   +4 I don't feel like it's a mathforces round at all. For me it's just easy problems with many corner cases and very unlikeable implementation. In C 4 i got WAs and my AC code is just 7 if statements
•  » » » 4 months ago, # ^ |   +7 My solution has only 2 ifs.
•  » » 4 months ago, # ^ |   +3 For me it felt like mathhomeworkforces. I did not have any programming problem, it was all logic and E some formular.
 » 4 months ago, # |   +7 Interesting problems, but Im too bad for them(
 » 4 months ago, # |   +155 WTF is going on with this comment section? Round isn't over yet
 » 4 months ago, # |   -20 b,c problems are real shit. worst ever problem set. All problems are observation based no logic and maths needed.
 » 4 months ago, # |   -17 I hate this B why I can't solve it spent the whole time on it :(
 » 4 months ago, # | ← Rev. 2 →   +54 I'm curious how the testers easily understood problem B and didn't they feel D is too easy for div2D??
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 I felt difficulty of in order B>C>D.
•  » » » 3 months ago, # ^ |   0 Hmmm, that looks impossible
•  » » » » 3 months ago, # ^ |   0 soryy,that last one is 'D' instead of 'B'.
 » 4 months ago, # |   +6 this contest was difficult for me
 » 4 months ago, # |   -36 Someone published the solutions :https://www.youtube.com/watch?v=fiPIWx88o_8 the round should be unrated !
•  » » 4 months ago, # ^ |   +183 Why, so that every time someone has a bad performance they can make the round unrated by uploading solutions?
•  » » » 4 months ago, # ^ |   -38 The round is going to become unrated? :(
•  » » » 4 months ago, # ^ |   -14 thank you man i am very angry and nervous because it was the first contest in which my rating would have increased by 150+ ... and then i come to know that there was some kind of cheating ....hmm i am very disappointed .... for credibility plz check my graph i have worked my ass off hmmmmmm...
•  » » » 4 months ago, # ^ |   0 No. That guy was livestreaming his solutions on youtube (from start ). But I'm honest and didn't visit the site and solved what i could myself.
•  » » » » 4 months ago, # ^ |   +10 I'm not saying that's what happened here. But I am saying that if you make a round unrated if there are cheaters, then every round will be unrated.
•  » » » » » 4 months ago, # ^ |   0 yeah that's true.
•  » » 4 months ago, # ^ |   +47 It was travisscott as it can be seen at 26:48.
•  » » 4 months ago, # ^ |   0 That's why number of LOSERS solving problem E increased exponentially suddenly at a certain point of time!!
•  » » » 4 months ago, # ^ |   0 CF predictor shows -2 rating for me, damn if cheating happened like that, I'm happy with this rating xD
•  » » » » 4 months ago, # ^ |   0 you might have used it when system tests are going on
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +16 In the video, only A, B and C were solved (and there were also two failed submissions on D).
•  » » 4 months ago, # ^ |   0 Due to actions of some of these people whole community suffers.Something should be done against them so that this is not repeated.
•  » » 4 months ago, # ^ |   0 The account in the video was of travisscott Action should be taken
•  » » » 4 months ago, # ^ |   0 probably a fake account. But plag testing should be done.
•  » » 4 months ago, # ^ |   0 Even if someone has posted the solutions, please do not share that in comments so that others can see those too during the contest!
 » 4 months ago, # |   +2 What is the pretest 2 for D?
•  » » 4 months ago, # ^ |   +1 Try with: 5 10 Output should be 0 11000 01100 00110 00011 10001
•  » » » 4 months ago, # ^ |   0 i see, how did you solve D
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   0 This problem is kind of similar to the popular N-Queens problem with some changes. I followed almost the same analogy, but I was a bit worried. And the solution got AC in the main tests! *_*
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 Oh, how I didn't get it. But how to implement it so?
•  » » » 4 months ago, # ^ |   0 My solution gives correct answer for this case but fails on pretest2:(
•  » » » 4 months ago, # ^ |   0 i tried to fill the grid diagonally and didn't realize this case
 » 4 months ago, # |   0 The contest was really impressive and fun.
 » 4 months ago, # | ← Rev. 2 →   +29 ObservationForces
 » 4 months ago, # |   +18 ConstructiveForces
 » 4 months ago, # |   +108 Did I accidentally open Codechef today for the contest?
•  » » 4 months ago, # ^ |   -20 how would we know also are you blind?
•  » » » 4 months ago, # ^ |   +36 Codeforces Rule #343: Ignore comments from unrated accounts
•  » » » » 4 months ago, # ^ |   +43 Codeforces Rule #434: Ignore comments from Master accounts registered 2 months ago
•  » » » » 4 months ago, # ^ |   -12 Irony is you are the one breaking that rule
•  » » » » » 4 months ago, # ^ | ← Rev. 2 →   +9 ^Sent from an unrated account that registered 9 hours ago...
 » 4 months ago, # |   0 I feel bad for the problem writers because of the people who posted the solution to the contest on youtube.On an unrelated note: is the contest going to be unrated?
•  » » 4 months ago, # ^ |   0 Plagiarism is checked I guess. So all those who copied will be anyway disqualifiedPlease look into it MikeMirzayanov physics0523
•  » » » 4 months ago, # ^ |   +3 Even then, you still could've gotten the gist of the solution of the problem and simply rewrote the code with your own style. It's also extremely difficult (basically impossible) to check for plagiarism if you submit with another language.
•  » » » » 4 months ago, # ^ |   +4 Especially the first 3 problems were just math formulas which are very hard to be checked for plagiarism.
•  » » » 4 months ago, # ^ |   +57 We found the cheater, too. If some users copied some solutions, the plagiarism checker will work.I think the contest will be still rated because sadly there are always some cheaters.
•  » » » » 4 months ago, # ^ |   0 Even He cheated with youtube live.But got +543 ..Cheating is easy now :v And my some friend copy and change some variable , not caught by checker ! Is plagiarism jokes ?
•  » » » 4 months ago, # ^ |   +5 Don't count on that. it's very easy to beat Plagiarism testing of codeforces.
•  » » » 4 months ago, # ^ |   0 Dude, no offense but do you really think plagiarism will work in these ad-hoc type problems ? Both B and C are have simply 1 liner solution. How will plagiarism work in this case ?
 » 4 months ago, # |   +23 I don't know if this was intended or not, but I literally solved problem B using the samples without thinking in the main problem.
•  » » 4 months ago, # ^ |   +1 I did that for A. :) Sample test cases clearly showed (n+1)/2 if one notices carefully.
 » 4 months ago, # |   +2 Nice contest, easy D. I got pretest 9 failed for problem E1 anyone has a clue about that pretest
•  » » 4 months ago, # ^ |   0 I think your code is giving wrong answer in test case: 1 5 9 Correct me if i am wrong.
•  » » » 4 months ago, # ^ |   0 oh. i got it .I was wrong.
•  » » » 4 months ago, # ^ |   0 This is not a valid input. p <= n.
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   0 it failed at 3 31 5 9
•  » » » » 4 months ago, # ^ |   0 I was talking about D.
•  » » » 4 months ago, # ^ |   0 Yes, my code failed at this test case. Thanks buddy
 » 4 months ago, # |   0 How to solve D? Greed- fill diagonally then it's left and right diagonal and so on...is giving wrong
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 the idea is ok but when you reach the cell (n-1,n) have to finish with the cell(1,n) and so on (apply modulo when you reach n)
•  » » 4 months ago, # ^ |   0 Try 1 3 6 Your code will return 4 110 111 011while it should return as mentioned: 0 110 011 101
•  » » » 4 months ago, # ^ |   0 My code gave output 0 yet didnt pass pretest 2
 » 4 months ago, # |   +9 Was C really just casework? (that's how I did it but..). I hate such questions, wastes time, and morale. Couldn't solve D due to it :(
•  » » 4 months ago, # ^ |   +25 My observation was that it's always optimal to put all the type 2 people first. The reasoning is that since they always take from the smaller pile, then the size of the pile they'll take from will be $x, x-1, x-2, ...$ (if $x$ is the original size of the smaller pile). The larger pile will never be taken by the type 2 people until its size is less than or equal to the size of the smaller pile, resulting the continuation of the sequence. Hence it's never better to put type 1 people first.The yes condition ends up being a+b >= n+m && min(a, b) >= m.
•  » » » 4 months ago, # ^ |   +8 That's it? 1 line of code. I tried caseworking and failed miserably.
•  » » » » 4 months ago, # ^ |   0 same here wasted lot of time
 » 4 months ago, # |   +5 I solved B completely based on the sample cases. I have no idea what does the problem say! I just make it work on samples, I do not know if I am gonna pass system tests or not. anyways, thanks for the round authors and testers.
 » 4 months ago, # | ← Rev. 2 →   +10 can someone tell me why my E1 solution fails at pretest 9 ?
•  » » 4 months ago, # ^ |   0 try 3 31 5 9
 » 4 months ago, # |   0 what the solution for E without the f(x) and prime thingi mean if the problem was just how to find number of permutation?
 » 4 months ago, # |   0 How to solve E1 ? Can someone point me my mistakes ? int n, k; vector a; /// size n || sorted bool solve(int x) { int res = 1; for (int i = 0, p = 0; i < n; ++i, ++x) { while (p + 1 < n && a[p + 1] <= x) p++; res = (1LL * res * (p - i + 1)) % k; if (res == 0) return false; } return true; } 
•  » » 4 months ago, # ^ | ← Rev. 2 →   +1 I think your mistake is in these lines for (int x = max(k, mx + 1); x <= n; ++x) res.push_back(x); You only need to iterate to mx. That's enough. So basically erase these lines
•  » » » 4 months ago, # ^ |   0 Yes, removing it give me AC, how stupid I was. Thansk for pointing out my mistakes
 » 4 months ago, # | ← Rev. 5 →   +6 In problem B, The picture in sample test case changed during the contest. Initially there were only 3 green ticks. At the end of the contest, there were 6. This created confusion.Proof-During contest-LinkWhen I saw after the contest-Link
•  » » 4 months ago, # ^ |   +4 Yes. The green ticks confused me (no matter how many they had). The clearest representation would be to group the pictures into 4 categories to show which ones are the same.
•  » » 4 months ago, # ^ |   0 Yes u noticed tooo
 » 4 months ago, # |   +1 Back to specialist, RIP rating -100 :(
•  » » 4 months ago, # ^ |   0 back to pupil,-127 :( all because of that problem B statement
 » 4 months ago, # |   +39 Understanding problem B's statement alone should be rewarded with +50 rating
•  » » 4 months ago, # ^ |   0 gimme that rating, I understood the problem in one go. (cuz i read it too slow)
 » 4 months ago, # |   +33 I usually don't comment on the quality of rounds, but I think this round was really bad. A — C are just formulas and cases, and D is constructive. You literally could know zero algoritms, even not know binsearch and sorting, and still solve A — D, and this is really bad in my opinion.
 » 4 months ago, # |   0 First time I solved 4th, Thanks physics0523, you also gave the overflow details in testcase, thanks for that too, Last time I wasn't able to solve due to overflow.
 » 4 months ago, # |   0 Can anyone explain why submission no. 85677436 for problem B of this contest is wrong? While solutions with similar code are accepted.
 » 4 months ago, # | ← Rev. 2 →   0 I used floor((n-1)/2) + 1 as my answer but this failed on pretest 3. I wonder why? Even in the editorial, same solution is mentioned. I give (n-1)/2 + 1 it passes. Where is the mistake?
•  » » 4 months ago, # ^ |   0 return type of floor is a double type. So if the returned value is large it will be printed in scientific notation (like 5e+008). where as when you do (n-1)/2 the result will remain an integer type and all its digits will be printed as normal integer.
 » 4 months ago, # |   +252 F: Think for 0.2 seconds and implement for 30 minutes. What an amazing problem.
 » 4 months ago, # |   +40
 » 4 months ago, # | ← Rev. 2 →   +3 rip
 » 4 months ago, # |   +31 Most Ad-hoc round I have ever given on CF.
 » 4 months ago, # |   0 A difficult contest compared to last few div2 contests.
 » 4 months ago, # |   +116 Problem B was written terribly and also sample explantions were really bad. I won't say that the round should be unrated but it was one of the worst rounds by far in terms of problem statements.
•  » » 4 months ago, # ^ |   +12 Misunderstood the problem and wasted a lot of time. RIP rating
•  » » » 4 months ago, # ^ |   +3 RIP English first... The diagrams were so confusing I just guessed formulas and hoped to get one that works.
•  » » 4 months ago, # ^ |   +11 Totally agree. Things were terribly written in the problem B. Was the problem B made to check English and patience of people? One-liner formula was the answer after reading the worst problem statement.
•  » » 4 months ago, # ^ |   0 Exactly. What the hell did the green ticks mean ? He could have simply showed the correct 4 out of 6 in green ticks if at all that's what the author wanted to show. I was scratching my head for 10 min over that.
•  » » » 4 months ago, # ^ |   0 yeah, ticks just messed up the statement further
 » 4 months ago, # |   +51 Boring contest
 » 4 months ago, # |   +1 I hope that someone will have a good proof that why it was optimal to start with type 2 People in Problem C ! I am not able to reason it out! why Starting with Type 1 people is not optimal !
•  » » 4 months ago, # ^ |   +6 My logic was that you can shove your unwanted cookies at type 1 at the end, and they'll eat anything. So, you should give your rarer cookies to type 2 people first
•  » » 4 months ago, # ^ | ← Rev. 2 →   +1 Its because type 1 people always chooses the cookie which is left MORE so they will never get angry if a cookie is left no matter v or c. Type 2 people choose the cookie which is left LESS so they will get angry if the cookie which is left less is finished. Attaching my code for your reference https://codeforces.com/contest/1371/submission/85648596.
•  » » » 4 months ago, # ^ |   0 i understand the idea ! But during the thought process I had in my mind that during all this If we feed all the TYPE 2 people first their will come a time where The ratio of cookies will reverse ! And That can happen quite some times during this procedure how to deal with it ?
•  » » » » 4 months ago, # ^ |   +1 Type 2 people are sadists they will try to eat up the cookies which are already less. So the number of both the cookies should at least be equal to the no of type2 ppl. The ratio won't reverse as type 2 will go on consuming the less cookies making it lesser.
•  » » 4 months ago, # ^ |   0 Type 2 people consume the cookies that are minimum in number. Suppose you reach a state where both cookies are equal and you have only type 1 people left : then they keep consuming alternatively till both become zero. But the type 2 people consumption is skewed. Since they keep consuming the lowest available cookies, they will run out of the cookies if (min(a,b) < num(type 2 people)). So I wouldn't start with type 1 because they are agnostic of either chocolate cookies or vanilla cookies. They keep consuming. But type 2 nope they see which is lowest.
 » 4 months ago, # |   +13 What was B? I didn't even go further after reading 4 lines. Highly unclear. Problems must be easy to understand but hard to solve. Seems this was reversed.
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 .
•  » » » 4 months ago, # ^ |   0 What cheating happened ?
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   0 .
•  » » » » » 4 months ago, # ^ | ← Rev. 2 →   +7 Its a request to make the round unrated. Worst Problem statements, Lengthy, confusing Adhoc Problems, Round full of cheating. Though my rating is getting a +45, but I don't care, because the round was terrible.
•  » » » » » » 4 months ago, # ^ | ← Rev. 2 →   0 no
•  » » 4 months ago, # ^ |   +15 B was like 5 lines of code wrapped in a ambiguous and confusing problem statement.
 » 4 months ago, # | ← Rev. 2 →   +9 For question E, I have a claim that the answers are consecutive if there exists any. Can I ask for a proof / disproof of this claim?
•  » » 4 months ago, # ^ |   0 Suppose that $x$ is the smallest positive number where f(x) is greater than 0 (In other words, $x$ is the smallest possible amount of candies you need to start with so you can beat all the opponents). Suppose that $y$ is the smallest positive number such that if you start with Y candies, then at some point of time, You'll be able to fight at least $p$ opponents and win.The answer lies between [x,y-1] inclusively.for any $z$ < $x$ has f(z) = 0, so divisible by p, so [0,X-1] is totally unacceptable answeranything greater than or equal to $y$ has f(z) = k * p, which is divisible by p , so [Y,infinity] is also unacceptable answer
•  » » » 4 months ago, # ^ |   0 actually, imo proving $f(z) = kp$ for $z \geq y$ is not trivial
•  » » » » 4 months ago, # ^ | ← Rev. 2 →   +3 But it's trivial to prove that $f(z) = kp$ for $z \ge 10^9$. Since, $f(z) = n!$ and given that $p \le n$, $f(z) \mod p = 0$
•  » » » » » 4 months ago, # ^ | ← Rev. 2 →   0 $y$ is always $\leq 10^9$
•  » » 4 months ago, # ^ | ← Rev. 6 →   +10 let $g(i)$ be the number of possible choices of $P[i]$ ($1$-indexed) for some $x$ you can prove that $g(i)$ is the same for any valid prefix $[1, i - 1]$ of $P$ obviously the number of permutations is the product of all $g(i)$ you know that $g(n) \leq 1$ (since only 1 integer remains), $g(i) \geq g(i - 1) - 1$ (because you can still choose all the indices that were valid for the position $i - 1$, except $P[i - 1]$) so the values assumed by $g$ are consecutive, and if an $i$ such that $g(i) \geq p$ exists, a $j$ such that $g(j) = p$ also exists an $x$ isn't valid if there is some $i$ such that either $g(i) = 0$ or $g(i) = p$ let $l$ be the maximum $x$ such that a $g(i) = 0$ exists, for $x' < x$, $g(i) = 0$ let $r$ be the minimum $x$ such that a $g(i) = p$ exists; for $x' > x$, $g(i) \geq p$, so there is some $j$ such that $g(j) = p$ so the only valid answers are in the interval $[l, r - 1]$ these values are all valid because $l$ is maximum and $r$ is minimum
•  » » 4 months ago, # ^ | ← Rev. 3 →   +10 Proof by AC: 85713453 (find minimum value in easy O(N), binary search to find the max value that works, print every number in between).Will update with my "proof" later.Proof: Claim: f(x) can be written as some factorial, lets call it X!, multiplied by some mumbers <=X. You can see that this is true when you calculate $p_i$, the number of possible numbers to go in the $i$th spot, after you've determined the first $p_0$ to $p_{i-1}$. f(x) equals $p_0 \cdot p_1 \cdot \ldots \cdot p_{n-2} \cdot p_{n-1}$. $p_i$ is calclated by (the number of numbers in the array <= x+i) — i. $i$ increases by $1$ each iteration, and because that is the only way for $p_i$ to decrease, is impossible to decrease by more than $1$. There is $1$ possible number that can go in the last position because only $1$ number is left, so the $p_{n-1}$ must equal $1$. Thus, say you found the position with the maximum number of possibilities had $X$ possibilities, f(x) = X! * {some numbers <= X} because all numbers between $1$ and $X$ inclusive must be represented in $p_0$ to $p_{n-1}$. This is important because you can say that $f(x)$ is divisible by all primes $<= X$ and not divisible by any primes $> X$, where $X$ is the number of possibilities of the index with the most possibilities. You can also show that the $X_a \le X_b$ for all $a < b$. This is because having a greater value of x in f(x) will never result in less possibilities for any position. Thus, for all $f(a)$ and $f(b)$, where $a < b$, if $f(a)$ is divisible by $p$, then $f(b)$ must also be divisible by $p$. $X_a$ is $> p$, and since $X_b \ge X_a$, $X_b > p$ as well. Starting from the minimum working $x$ (before of which $f(x)$ is all $0$), no value of $x$ after the first non-working $x$ can work, so the answer must be in the form of a continguous sequence of numbers.
 » 4 months ago, # |   +16 It is ironical that someone who has physics in his username loves math!!!
•  » » 4 months ago, # ^ |   +9 it's not ironical.
•  » » 4 months ago, # ^ |   +22 Physics is just spicy math.
 » 4 months ago, # |   +57 physics0523 write code for problem F. then he write problem for his code
 » 4 months ago, # |   -19 Such a shitty round.
 » 4 months ago, # |   +18 Terrible legends to problems, most of the time was spent on understanding the statesment((
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 yes bcoz of this I wasted more than 1 hour on 2nd question and this made this round very bad for me
 » 4 months ago, # |   +11 A lot of Observational questions. If it hits , you could get AC in 5 mins, otherwise many kept scratching, like me.
•  » » 4 months ago, # ^ |   +15 Accurately put. That's exactly how it was. Hit the idea or hit the right youtube link. XD
•  » » 4 months ago, # ^ |   +2 I'm pretty bad at Observational questions. Is there any tag related to such problems? I want to solve them. Problem like problem C, I mean.
 » 4 months ago, # |   -11 Worst contest ever :/
 » 4 months ago, # | ← Rev. 2 →   -12 logic in Problem D is the same as this problem from recent div3 contest https://codeforces.com/contest/1360/problem/G
 » 4 months ago, # | ← Rev. 4 →   0 Can someone explain to me the solution to A? I used n / 2 with ceil.
•  » » 4 months ago, # ^ |   0 ans = n / 2 + n % 2, because if n is odd, then we have 1 + (n — 1), 2 + (n — 2) ... n
•  » » » 4 months ago, # ^ |   +3 or simply just (n+1)/2 as languages round down during division.
•  » » 4 months ago, # ^ |   0 print each test-case output in newline.
•  » » 4 months ago, # ^ |   0 Use ceil(n*1.0/2) it will work In your case, you are using n/2 which will be treated as int and to make it float multiply it with 1.0if n=5 your answer will be ceil(5/2)=ceil(2)=2 but it should be 3 as ceil(5*1.0/2)=ceil(2.5)=3
•  » » » 4 months ago, # ^ |   0 n was declared as float. I used ceil(n/2.0).
•  » » » » 4 months ago, # ^ |   0 float can't accurately represent all numbers up to 10^9. Needs to be double or done via integer maths.
•  » » » » » 4 months ago, # ^ |   0 ohhh, ok thanks
•  » » » » 4 months ago, # ^ | ← Rev. 3 →   0 you are printing all answers in same line print them in different linescout<
 » 4 months ago, # |   +1 Question B was not clear. In the first sample test case,they should have clarified that the 4th and 5th picture are also same (they have different r thats why they should be different). Wasted more than 1 hour on it (I figured the formula in 2minutes) and could not touch C and D properly. Plz,clarify these things.Even on asking the jury ,it said only the last picture(for 1st sample test case) is not considered but actually the last 3 pictures were not considered in the answer.
 » 4 months ago, # |   +2 I hope Editorial has some brilliant solution for F. Otherwise it is one of the worst problems I've seen in a while.
 » 4 months ago, # |   +12 I guess it will be hard to believe the testers that comment "problems are very interesting" after this round:(
 » 4 months ago, # |   0 Very good round!
•  » » 4 months ago, # ^ |   0 I think that it is in a sarcastic way!
•  » » » 4 months ago, # ^ |   0 The first three tasks were really easy. But I misunderstood the second task, and because of this I passed it at the 65th minute. If I would immediately understand the second task, then I would solve it much earlier and, possibly, would pass the 3rd task. :(
 » 4 months ago, # | ← Rev. 4 →   +100 Some of the shortest code for A-C that I've seen...A: (n+1)/2B: r >= n ? (n*(n-1)/2 + 1) : (r*(r+1)/2)C: (a+b < n+m || min(a, b) < m) ? "No" : "Yes"
•  » » 4 months ago, # ^ |   +5 please can you explain the solution of B and C,
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +26 B: When $n > k$, then there are $k$ different patterns, one starting at each different day of the week. When $n \le k$, you only have the straight line pattern. So for $r \ge n$, you get $1+2+...+(n-1) + 1$. For $r < n$ there will never be enough days in the week for a straight line, so it's $1+2+...+r$.C: The observation was that it's always optimal to put all the type 2 people first. The reasoning is that since they always take from the smaller pile, then the size of the pile they'll take from will be $x,x−1,x−2,...$ (if $x$ is the original size of the smaller pile). The larger pile will never be taken by the type 2 people until its size is less than or equal to the size of the smaller pile, resulting the continuation of the sequence. Type 1 people always take from the larger pile, so you'll only fail if you run out of cookies. Hence it's never better to put type 1 people first. You also need to check if there are enough total cookies for all the guests.
•  » » » » 4 months ago, # ^ |   0 This should be the editorial for C
•  » » 4 months ago, # ^ |   0 Include D as well :XD
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 B should be (r*(r+1)/2), isn't it? Typo?
•  » » » 4 months ago, # ^ |   0 Oops you're right, fixed.
 » 4 months ago, # |   0 Any idea what does TC4 in E1 looks like?
 » 4 months ago, # | ← Rev. 2 →   +147 Problem B is absolute trash, super unclear, and boring. Problem C isn't better. Author, can you tell me what the interesting idea or approach is behind this problem? As for me, it's just about understanding problem statements and implementing stupid case analysis.You know, >75% of participants solve only A, B, and C. So for them it was a 100% shitty round.P.S. please never invite AmShZ and noobiesAG as testers anymore, if they find this round "really interesting" and "such a great".
•  » » 4 months ago, # ^ |   +1 Solved A in 3 mins from then till now I am unable to cracks B's statement If B & C problems are like that how would anyone solve any on Div 2
 » 4 months ago, # | ← Rev. 3 →   +23 Even A,B,C Solution found on youtube after 1 hours+ . Link. Please notice .MikeMirzayanov ..Please find all the cheaters or and if not possible hope this contest will be unrated.I know to make a contest, authors made so hard work,, But It is unfair someone copy the solution and take positive rating before our eyes And someone go down for only cheaters and gain negative rating . . **N.B: I was not submit any solution cause busy sometimes on the contest time.Now i feel good cause some problem statement was unclear too , specially B..the contest was worst overall.
•  » » 4 months ago, # ^ |   +17 It's impossible to catch cheaters. The first three problems are a simple formula so you can rewrite it however you want. In addition, many people were confused by the problem statement for B. Many questions were asked with disappointing responses. The problems were of really low quality so many people who usually solved the first 3 questions couldn't even solve 2! This would cause the cheaters to get a lot of positive rating change which is clearly unfair to the community. Thus, I think that we should make this round unrated.
•  » » » 4 months ago, # ^ |   0 Yes the jury was badd
•  » » » 4 months ago, # ^ |   -8 Listen to the community: looking at the comments I can find only 2 which say that they enjoyed the contest (not including testers who apparently have a different taste of problems than we do). Clearly, the contest is disappointing to a lot of people. This can be shown by the contribution of this blog. 5 minutes ago it was at 713 and now it is 683. I think that this round should be unrated
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 Its correct.Cheaters solved a,b,c easily.and someone can't solved B with their hard work. So By result cheaters got positive rating and hard worker got negative rating . It's unfair (
 » 4 months ago, # |   +8 i solved e2 but i didn t understand problem b:))
 » 4 months ago, # |   0 Wow, Problem F is really constructive. Are there any easy solutions to F? I tried to implement the Segment Tree, but it is too hard (at least in my case)
 » 4 months ago, # |   +43 B should have tag unreadbale instead of math.
•  » » 4 months ago, # ^ |   0 The statement for B was very confusing.For the whole contest, I thought that every week that divides the total number of days given, results only in one pattern.
 » 4 months ago, # |