Hi community,
I'm glad to invite you to my first contest, Codeforces Round 652 (Div. 2) which will be held at 23.06.2020 17:05 (Московское время) ($$$\text{notice the unusual time}$$$). The problems are mainly prepared and invented by me. The round is rated for participants with rating strictly less than $$$2100$$$, others are able to take part in the round out of competition. You will be given $$$2$$$ $$$\text{hours}$$$ to solve $$$6$$$ $$$\text{problems}$$$.
Firstly I'd like to thank adedalic for coordinating and reviewing the round, as well as helping with many different things.
I'd like to thank antontrygubO_o, physics0523, McDic, Ashishgup, dannyboy20031204, Kuzey, SinaSahabi, FieryPhoenix, ma_da_fa_ka, ITDOI, AM_I_Learning, awoo, lynmisakura, JustasLe and ArimeZ for testing the round and giving valuable feedback.
Also I'd like to thank coauthors, amiralisalimi, AS.82 and davooddkareshki for helping me with inventing and choosing the problems.
Finally, thanks to MikeMirzayanov for very nice and convenient Codeforces and Polygon platforms.
I wish you all will find the problems interesting, thank you for participating, and good luck!
$$$\text{Scoring distribution : } \; 500 ~- 1000 ~- 1500 ~- 2000 ~- 2500 ~- 3000$$$
$$$\textbf{UPD}$$$ : Editorial is out
An Iranian round after a long time .....
Thanks for your hard work.
Thanks, we'll see more Iranian rounds from now. :]
What matters to us is a codeforces round, whether it's Indian/Iranian/else. We love codeforces
Just some contribution spamming
Its true. But these comments are mostly about finding someone you can relate to as the problem setter among the vast CF users. So there is no harm done.
I am an atheist.Can i participate in this round?
You welcome.
I hope that your question is not a way to make fun of author's faith. Cause I'm smelling something like that
Really like to discuss the down voters. Why someone asks something like that? Can you see any kind of religion constraints in announcement or in CodeForces rules? Then let me know too!
You got downvotes because of a totally off-topic comment.
He got downvotes because he misinterpreted the essence of the question which boils down to the relevance of expression of faith in the contest announcement.
?
Like, why are you answering yourself
Guys may you tell me why someone should ask such question. Just your opinion. I mean the abhisar1414 guy
Reading it the 7th time. I don't understand what you are saying.
He mentioned formal compulsories in Iran. And just to remind him, you can find formal compulsories anywhere, I just made an example of a formal compulsory in America, the SAINT OF LIBERTY. I felt responsable to make things clear. Hope you get it.
Can't you figure out which comment answers what?
They're on the same level..
There is a button on top for navigating to the parent comment.
Yes, that's how I know they're on the same level. Your two comments lead to the same comment.
Right, but didn't you say that I was answering myself?
The sentence about god was the irrelevant in the announcement. If it was not there, no one would have started this.
Would you refuse to accept this?
Ashishgup held three rounds and now he is a tester in this one. That's a lot of work.
Deleted
I'll definitely be waiting for his first div. 1 round.
I am a beginner.Can any one give some advice about this contest.Please ,It will be helpful for me.
A — dificulty will be less than 1200 & B -will less than 1400 most of the time..practise those problem from problemset with those difficulties . I think it will help
many many thanks for your advice.
If you get stuck on these, read the editorials. They will give you an idea of the sorts of algorithms that you need for problems at this level.
If it your first contest, don't worry if you don't solve much. Even as a very experienced programmer (40 years as a professional software engineer) it took me a few tries to get the hang of programming contests.
Unless you are in the last couple of minutes of a contest, always try running the provided examples locally (or using "custom test") before you submit. On Codeforces you lose points for failed submissions.
If you know more than one programming language use whichever you find easiest to write. So long as you find a reasonable algorithm, performance is unlikely to be a major issue until at least the 4th of 5th problem. I use Python for my submissions, and (using PyPy3 to run it) I have yet to find a problem that it is too slow for.
Moreover, after the contest is over you can always read the editorials or can refer others solutions. You can practice for any difficulty or any tag from the problemset by using filter provided on the right side.
"Happy Coding :)".
Thanks a lot...... I will remember your suggestions... again thanks a lot .... "Happy Coding you too & this community :)"
As a Tester I feel that the problem set is more diverse and good for everyone , there is something for everyone to solve and ya the round is good for those who just want to start with competitive coding!. Hope everyone to give this nice round!
Nowadays a contest without this declaration is rare.
Ya it is a trend , let it continue!
Hoping to get a big +delta in this round
Are the statements short?
Interesting Question answer is "5961207468652073746174656d656e7473206172652073686f727465722e"
Decode this cipher text to get the original answer.
Ya the statements are shorter.
Well said buddy!
How?
text is in HEX encoding
Any specific reason for the unusual time?
As old time hinders dinner in most Asian countries, xD
XD
Totally true!
Very Excited for your first contest!!
I think that's the beauty of codeforces. We get the best of problems from different countries which covers lot of diverse types of problems and helps us improve in different areas with each contest. We got 2-3 good indian rounds, this one is an Iranian round and 654 Div2 will be a Japanese round:).
First time when i came across this platform, I found it very weird because it's UI is not very attractive but when i started participating in contests I have just fallen in love with this platform and no other coding platform gives me this much of joy while solving questions. I think codeforces community is really great and helps a lot in growing as a competitive coder.
Now Wish you Bad luck for downvoting bruh!
Stop posting shitty memes!
Downvoted. There's no reason to drag in religion here on Codeforces -- keep it to yourself.
I don't see any reason to not to add a single line, which doesn't hurt anyone in any kind(or does it?). If i could see, then i would not.
I'd say the setter has some freedom to include selected topics in his announcement/problems. A few contests back we defended Codeforces Round 645 (Div. 2) for having the corona-virus theme. Clearly, while the theme is offensive to some people, the vast majority of users seemed to find no harm in the in the author expressing his personal humor here.
We must not adopt double standards: we tend to give our authors leeway to include their personal touch in their contests and announcements. Whether it is references to anime, marvel universes, corona, or religion, a persona touch is usually tolerated by the community historically.
If a subject is considered too divisive then the community will naturally express it with sufficient downvotes, so either way we'll find out what everyone thinks.
I think allowing the authors to add their 'personal touch' is the right approach. It's lots of work to author a contest, they should be able to broadcast their messages to people who read the CF announcements.
Also, I can't imagine too many people caring enough to mass downvote an announcement or editorial. And this is good because most of us are here to improve on our CP abilities and not to get offended by the authors' political views, religion, and memes.
I think as long it is not offensive for anybody, authors can add whatever they want.
Thank you brother karim
You can proudly add it bro. I think, this will not hurt anyone.
I personally love when the authors include their personal touch to problems(or blog) and the editorials. It feels real-like problems. Also if you make an editorial like this I'd love it :-)
When You are not start every work with name of GOD means there are not any GOD that is the best.
if he use "In the name of Allah" it may be correct but it's a General sentence and all of people know it and hear it at least once.
Reading it the 5th time. I don't understand what you are saying.
Why you shouldn't use google translate
FYI in Iran it's a formal compulsory custom, much like a head cover for girls. Every article, movie etc. must start with this string. It's not an author's personal statement. More like a national trademark for a text.
please correct me if I was wrong.
Yeah you're right! Just like a white-man in America that MUST be racist if not he should survive under Polices' hits. Just stop trying to make a saint out of yourself.
[Deleted]
No you didn't. And let me make things clear. The author has not followed any compulsories. Just personal beliefs.
omg, why som many downvotes lol? If anyone bothers to explain, I'd gladly read that.
So let me to do so. You just tried to make a bad and ugly face out of Iran with mentioning Iranian "formal compulsory" and pretending that they are just in Iran! And I think you got a proper feedback.
thanks for the explanation
Guys! Just take it easy! You are blaming the author cause of adding a simple line with some common words(And not a verse of Quran!), while you are sharing the black lives matter hashtag on Instagram and Twitter, HYPOCRITICALLY! You put knees on faiths' throat and try to kill them instead of learning that they exist, and you should live along them. I'm sorry if I just hurt someone with a kind of brute comment, but think about it!
Bismillāh is not "some common words", and your metaphor is ridiculous. Regardless, everyone should be free to follow their beliefs and traditions.
Do you see any "Allah" word?! God is a common word that doesn't really refer to any specific religion. It's not Allah, Jesus and things like that which they belong to a religion. Of course God is a common and general word
Stop being so boring
Ok, I'm deleting this meme.
wait what ! 3 memes with 5 Rev. memes game -_-
Here is the truth.
when you go for edit its tell not to change the idea..but you change and change..Nothing else
In the name of God... Me an atheist....
It is going to be an interesting round.
I promise that the problems are not affected by religions in any kind.
I don't know why people are talking so much just for "In the name of God". The main motive should be to participate and learn as much as you can. I think pointing someone just like this is not good. And we as Codeforces Community are "ONE".
I request MikeMirzayanov to make this clear to everyone, please.
Deleted
Are you obsessed with commenting
Deleted
No you are desperately waiting for upvotes
Deleted
Is your obsession for codeforces the reason why you're a top contributor at codechef discuss.
Or is it obsession of commenting?
Great
Please stop downvoting me. I was just asking a question.
Why do you even bother asking these questions?
Looking forward to the contest!
Lol Ashishgup everywhere orz...
[Deleted]
you can not be a good coder by skipping geometry problem.so need to practice more in which you are weak
I wish there aren't any interactive problems because i'm done with those.
Hey guys..did you notice vovuh is back with his div-3 round...? so excited!!
Yep!
Is it just me or do others feel as well that the quality of comments section is going down? All I see are a lot of shitty memes, "Is it rated" and relentless pursuit from a lot of people to just comment on something for the sake of it. It's extremely uncomfortable as quality discussion on problems gets suppressed due to a lot of this unnecessary crap
You should make a blog about it.
The last time there was a single setter vs an army of testers,Ehab happened! Hope God saves this round!
Please mention about unusual start time in announcement. I noticed it after reading it in comment section.
What is Usual start time?
It is usually 14:35 UTC. I think you should include it in announcement as many presume the usual time.
Thanks dude, I really didn't know it(no joke), blog is updated.
BTW I did my best to make the statements as short and clear as they should be, stories are written in another font so you can skip them, but don't forget to read them when waiting for system test. I tried to lessen number of tests so we should not see long queues.
you lessened the number of tests !
I wish that they are strong so no one solution will fail
Do you think quality of tests is proportional to number of tests?
I didn't say that :)
Congrats on your first round. You are among the most interactive and approachable problem setters in codeforces community. It's your excitement for the round which makes it special.
btw your name is very interestng.
You welcome.
guys post god memes
Stop posting from fake account.
thanks for your explanation!
Polygon is the platform where all the problem is set, tested, and validated for the Codeforces round !!
All the best to you for your maiden contest!
Thank you for remembering me.
How much money does someone makes by problem setting in these contests ,
Coffee is expensive. :(
How tf are such low quality irrelevant memes getting such upvotes? Not fair to those who work their asses off to make worse memes and still get more upvotes!
The world is unfair ;)
Seeing your ratings graph, I'd say it isn't ;)
how the fuck do you think that is an irrelevant meme . DO you have some sense newbie
Only sufficient for a Wifi or Data Recharge! for next contest!
So you get a recharge for every contest?
Sometimes When my limited netpack (1.5 GB/day ) for the whole day becomes empty then I do take a recharge.
I generally use an opposite strategy, either i don't use net or use it very carefully till the contest XDXD
you guys use personal net?
Why the downvotes ? It's a genuine question...
once again Ashishgup
Why are people downvoting your comment and upvoting https://codeforces.net/blog/entry/78877?#comment-646706 such comments
Because nobody likes redundancy
Edit: Got it. thanks.
Which problem quality? Problems are trash. xD
https://codeforces.net/blog/entry/78877?#comment-646718
.
we don't do that here. :v
Well ,Is there anybody else other than me who can relate to this ?
True af.
Score distributions are out.
I think you want to say Score distributions are out.
Thanks.
dont be critic toward deadlycritic.(ps:just kidding)
Till now I was thinking that the round will be held today. I was prepared for it. :(
OK, got it.
Hope your first contest will be more interesting.
I have a good feeling to this contest <3 ;)
How can i see my solved problem distribution on CF ? (difficulty-wise) Thanks in advance........
Codeforces Visualizer developed by S.J. Sakib
You can use this awesome tool to see difficulty-wise as well as tag-wise distribution of any CF account. Moreover, you can compare yourself with anyone as long as you know their cf handle. AFAIK there is no such option on codeforces.
DeadlyCritic Bro what an inspiring curve of rating you have . As a beginner these things motivate me a lot . Hoping to have more rounds from you!!
To further motivate you, just check ruban 's graph. You will understand the dedication towards cp
I thought my dedication level is pretty strong
But after seeing this I realize, compared to him, mine is nothing!
hats off ruban
UNUSUAL TIME
Stop posting irrelevant memes
please for god sake,stop posting shitty memes.
Me: Yes, I can do it. I can solve all the problems. I will be rank 1. But after solving at max two problems, enough I am done with it. I am going to sleep.
Finally, downvotes
I hope to be a pupil in today's contest anyway.
Countrymate, I'll keep watching over you today!
Wishing you good luck.
Hope you would become pupil in next contest
CodeForces and all the problem setters, coordinators, testers are doing an amazing job to arrange such good contests on such regular basis. Hats Off to their efforts!
ok
Why people nowadays are discussing such irrelevant topics in the comment sections?You guys have other social sites to do these stuffs.CF is not the right place to share memes & have a discussion about if the author can add "In The Name of God" in his post or not.
Humble request to authors: Don't make it Propaganda forces Thank you!
Hopefully, your entry as a contest writer will be interesting and hoping for an interesting contest as you said :).
submissions in queue for a long time. will contest delay?
This time is very unusual as per India. As many of the students stay in the hostel, and it coincides with dinner timings of the mess: 1930-2130 IST. So either we have to skip dinner or lag in the contest.
its not tough to delay dinner about 1/2 hours..Its worldwide..so some people always face problem brother..
dude leave this contest and go to your home first, :)
I don't know if you are lucky to have nice food in mess, I never gave a thought to skipping or lagging in contests for mess food.
U are in college at the time of this lockdown ? Seems very far-fetched :P
GLHF EVERYONE!
Man I keep getting Wa on A again I solved 3 problems and my rating will stay the same :(
How to solve DWhat was D.can you please prove this.i was able to get both recurrence but was not able to figure out when to put the condition .
The tree of level x can be decomposed into three subtrees of level (x-2), (x-2), (x-1) respectively, which are connected by root node. Claws can be chosen from the bottom. The claw including root is used for x=3. For x=4, one subtree will be of level 3 so its root cannot be used. For x=5, two subtrees will be of level 3 so root cannot be used. For x=6, the roots of all three subtrees are unused so one more claw can be picked. similarly, for every multiple of 3 one extra claw is picked.
I lost too much time convincing myself that the proof for problem B I had in my mind was correct :D Anyway, I really enjoyed the problems. It was a good contest.
"For each test case, print a single integer — the maximum number of yellow vertices Lee can make modulo 10^9+7." — having the maximum modulo instead of the maximum actual answer modulo 10^9+7 was very nasty. Should have been explained better, as usually the problems require the actual maximum modulo something.
What? I think that's just messed up wording, because I solved the standard problem and passed the pretests.
Summary of the contest:
Wrong answer on pretest 2
Easy D
Stop making so big pictures... You can easily resize it.
Sorry, this is the first time I've ever posted a meme. It looked way too big for me as well. Does codeforces has a resize tool built-in?
No, you can save lower resolution in Paint, for example. Now it's nice :)
How to solve D??
$$$f(n) = f(n-3) + 4*T_{n-2,0}$$$
where $$$T_{n,0}$$$ is the number of nodes with degree 0 in the RDB of level n
Please don't write
−In the name of God −
from next time :(Please don't comment
Please don't write −In the name of God − from next time :(
from next time :)How to solve problem E? I tried to model the problem using graph network- food type as node and each friend as edge. How to proceed?
If solution exists then for any subset of people solution exists as well, so try to find a guy who can be in last position.
E should be solved using greedy and has no relationship with graphs.
any hint for problem D !?
Greedy from the bottom
The tree obtained at level I is a combination trees obtained in level I-1 and level I-2. this is. A hint. Now everything is a Dp
Think about how many leaves you can have in a k-level tree. You can build up your solution based on this.
is it solvable by math solution ?
All 1-D DP relations are actually mathematical functions. Same about this one. But obviously, here you would be needing memorization to avoid TLE.
Use greedy and simple dp. The code is quite clean.
How to solve E? It is a variation of Cow and Snacks. How to handle multiplicity of plates?
Nice and hard problem E, thank you author
Alt Account Spotted
I did not like this one. For me D and E where hard to understand, I restarted two or three times just to notice after some times that I did get the question wrong.
Agree. I have to read D and E many times to understand them correctly. The statements are easy to cause confusion.
You tried to make a hard D ? You definitely made a deceptive D. Loved solving it.
Actually earlier D was something Different which you might not Like , this was invented after hardships , this was a really nice DP problem I ever solved.
I don't know why my D solution is correct.
Edit: oh nvm disregard
[deleted]
You are very lucky, because the modulo of the max is different from the maximum of modulo. But in this problem the two values doesn't differ from more than 4, so with some luck it works.
you get maximum of two thing that differ at most one. this solotion is correct but our solotin is another thing
Generally
max(a, b) != max(a % mod, b % mod)
Wow, it's true, and my solution with max should fall, but it worked :)
It should not, as we know $$$a$$$ and $$$b$$$ differ by $$$4$$$ at most, so it works as long as $$$max(a \% mod, b \% mod) < mod-4$$$, and smallest such $$$n$$$ was so big.
Did you consider changing Mod value instead of N or was it intended to leave that solution AC?
I didn't realize that I can change Mod, thanks I will note it for my later rounds, thank you. I prefer those solutions to fall, at least one-third of the solutions would fall.
You're welcome :) I liked the problems actually they were very interesting. In the contest I've written solution similar to his one but was sure it will fail and you planed to trick us with such a case so I gave it 10 minutes more to find out the pattern when N is divisible by 3! That's why I tried to generate a valid MOD to prove I was thinking correctly LOL.
:), If the MOD was something special, then yes I would do the same, but not when MOD is $$$10^9+7$$$. Also the sample had $$$2\cdot 10^6$$$, so there were no room for WA. Except some special Time Limit exceeded.
Sure actually $$$1000002193$$$ is the first prime number >= $$$10^9$$$ which could make their solution fail as I tested for each prime all possible values of N. I know it's hard to find such cases unless you predict that someone would do that exact solution while writing the problem constraints!
I think it's OK, this is my code:
Isn't it right? Why you think it's incorrect?
My English is't well, please forgive me. ovo
2*(1e9+7) < maxint
So that it works well
you're comparing 2 numbers that are in module 1e+9 +7, but i dont know why it's AC
To be sure that they will be no errors with the max, you can remark that the second value is greater than the first one if and only if
i%3 == 0
Very descriptive questions. And I must say, the names were quite good too.
Why problem D I can mod then max to pp the testcases?
No need to use max, ans is:
dp[x] = (4*(!(x%3)) + ((2LL*solve(x-2))%mod + solve(x-1))%mod)%mod;
PS: Just clarifying that badcw was asking another thing before, I have no idea why the solution with max works.
Thanks, I check it's all correct in [1,2e6]
Can someone please help me out with B?
you just have to find first and last occurrence of "1" and change substring between first and last "1" to either "0" if any "0" is present in it . or substring remains same if there is no "0" in it
What?!
'A' problem ruined my day,thx
'C' --> peace of shit
was C about picking first i+b(i)-1 FOR.MIN AND THEN K max elemnt for max?
It was sorting plus two pointers problem. First sort both arrays. Then one pointer at last element of arr1 and second at n-kth position, then move both pointers carefully.
Every friend gets one of the k biggest numbers. Then distribute from the remaining numbers the w[0] smallest to the friends getting the most numbers. Then next friend with next biggest number gets next w[1] smallest numbers etc...
After got 4 wrong answer and then got accepted.. Then just i thought ,, "How foolish i am" !
Edit: answer was quite easy .
Cool problem D, even though my finger is fat and I typed %2, instead of %3. Just realized :D
How to solve D?
By DP, ans is:
dp[x] = (4*(!(x%3)) + ((2LL*solve(x-2))%mod + solve(x-1))%mod)%mod;
If you try to draw the first trees, you will realize that a tree of level x is composed by this three trees.
By DP. You can build a relation. ans[x] = (4*leaves[x-2] + ans[x-3]). Here leaves[i] denotes the number of leaf nodes in ith level tree.
When First Problem is A Geometry Problem, its just a mood spoiler ! :/
Why the problem suffix has to be "LEE"?
i dont know. it this name isnt iranian and i thing it isnt from any countery.
it is from deadly critic mind
Lee is a (last name) I guess.
in iran it isnt
Take a look at this: https://en.m.wikipedia.org/wiki/Lee_(English_surname)
Make good problems? never, instead add not-so-funny things to statements.
The problems were really good. I thought if there is any other reason for it.
Interesting problems. Especially E, though I could not solve it. How to solve E?
hint: delete vertexes in a good order
Looks like I am the only one who thought that the sum of n over all test cases can exceed 10^7 in problem D :(.
No you didn't thought wrong.
I thought of it but then I realized that it is sort of a hint that all answers need to be pre-calculated separately and not for each test-case.
Actually they can exceed. You have to preprocess.
It was intended. :)
understood after got wrong answer . xD
Nice Contest! Liked the problems, hoping for more contests from you in future :)
Why max function is work here?. https://codeforces.net/contest/1369/submission/84764258
https://codeforces.net/contest/1369/submission/84784993 really?? What about making strong systests?
you get maximum of two thing that differ at most one. this solotion is correct but our solotin is another thing
Thanks for good round!
wow, that's quite funny, thanks
Problem A, why call it OX-axis and OY-axis ? What does O stand for ?
O is for Origin.
The center of the plane.
Origin
This is a very standard notation, O stands for origin.
O is the point of axis' intersection
Thanks. I figured as much. But is there an example where this is not the case? Like if the X and Y axes were shifted by +1, would it be 1X-axis and 1Y-axis ?
That's not 0(Zero) that is O(vowel).think suppose O is the center with(0,0) or whatever .So no need to change the center. just focus on the parallel rule.
Plenty of examples. +1
Story in problem E was amusing
.
Here as the virtual Moss for Codeforces, busting cheaters and getting them out of their bills. I hereby present you another team Admiral_Wolf and smiling_addu
B: 84762137 and 84789248 , If you swap the if-else part, it's easy to say the solutions are the same.
C: 84771585 and 84786359 , Only the vectors in both the solutions are different. Also c <= k and the strange way c-k <= 0 are again the same, they did to save them from the moss.
D: 84791187 and 84796767 , Again the solutions are the same if you look at the parts below it's evident something is strange
dp[i] += (dp[i - 1] + dp[i - 2] + dp[i - 2]) % MOD;
dp[i] = (dp[i] + dp[i-1] + 2*dp[i-2])%mod;
To save from Moss,
2*dp[i-2] == the strange way dp[i-2] + dp[i-2]
DeadlyCritic MikeMirzayanov adedalic
UPD: The solutions are skipped
in problem D: you get maximum of two thing that differ at most one. this solotion is correct but our solotin is another thing
I'm not the one who you should tag =).
Not able to view the editorial. Its showing- "You are not allowed to view the requested page".
Same for me as well.
Recently, lots of cheating is happening in codeforces. In most of the contests solution of problems A, B, C and sometimes D (Div. 2) are being made available in ideone, which is not only increasing fake ratings, many genuine ratings are also being affected because of increasing ranks.
It's very disappointing and the ones who are suffering due to this are mainly noobs, after doing 3 problems many are getting huge rating drops. It is even leading to frustration and loss of confidence.
Really glad to see someone speak on this. In almost every contest, someone posts the solution on ideone(knowingly) and there are so many talented coders out there copying the same and getting their ratings boosted. Also some people are getting huge rating drops due to this. It's also ruining the fun of the contests. Are we helpless and can't do anything against this other than plagiarism checks.
Also, I am ready to receive all the downvotes from the cheaters.
That was quite the LEE-round
I submitted the C question and passed the pretest but now it shows wrong answer. My logic matches the editorial and i am not able to find the bug in my code. Please help. https://codeforces.net/contest/1369/submission/84786141
Aiman11
This happens cause you are accessing storage that is out of bounds In your while loop, add a condition of q<k.
Here 84786141 is the submission with the changes.
Thanks! I submitted it again and it was accepted. Cant believe i lost ratings due to such a silly mistake :(
Why does this doesn't work for D? I find for every level how many more(new) vertices with 3 children were added from previous level and then do dp[i]=dp[i]+dp[i-2]. Solution: https://codeforces.net/contest/1369/submission/84822790
You are undercounting because there are other claws you can pick as well. I explain my solution that counts those at 1:34:00 here.
Perfect explanation.
Can anyone tell me how the answer for the case n = 5 is 12 in problem D? Any image would be highly appreciated
Hope this will help!
This is for $$$n = 5$$$
and this is for $$$n = 6$$$
Thank you brother..its helped so much to solve D.
I accidentally used Ideone on public settings and someone copied and submitted the same code int this contest and now i received a system email regarding the penalty for this. Can someone guide me as to what should i do. This is the link of my submissions https://ideone.com/qDpu3b
Why I am getting MLE on this submisssion https://codeforces.net/contest/1369/submission/84815861 for problem C? tnx. My biggest variables are two arrays of integers of size 200000 each which makes it in total less than 2 MB.
Your insertion sort doesn't terminate if the element needs to be at the start of the array.
It seems insertion sort works fine. Can you please be a little more concrete?
Try the test case below. During insertion sort key will be -1 and get compared to 13 (a[1]), then 1 (a[0]), then undefined (a[-1]) and at that point you rely on uninitialised memory to be <= -1 to stop it.
1
4 2
1 13 -1 17
3 1
Here's my screencast of getting 7th place. I discuss the solutions to all problems at the end.
Good luck, feel free to copy some of my trash proofs from editorial if you wish.
Enjoyed the contest and neat editorials. Thank you DeadlyCritic and team !
Мой русский разбор на E (может кому-то будет интересно) https://telegra.ph/Razbor-zadachi-E652-Div2-06-23
A fact :
Problems' names are connected to difficulties, also they show you the gaps with high accuracy.
What? Now??
I was unsure to post it or not before contest, and then I forgot to do it :(
My first round))
My first round
Мой первый раунд)