Supermagzzz's blog

By Supermagzzz, history, 9 months ago, translation,

Hello, Codeforces!

<almost-copy-pasted-part>

Hello! Codeforces Round #690 (Div. 3) will start at Dec/15/2020 17:35 (Moscow time). You will be offered 6 problems (one of them is split into two subtasks) with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating 1600 or higher, can register for the round unofficially. The round will be hosted by rules of educational rounds (extended ACM-ICPC). Thus, during the round, solutions will be judged on preliminary tests, and after the round it will be a 12-hour phase of open hacks. I tried to make strong tests — just like you will be upset if many solutions fail after the contest is over.

You will be given 6 problems and 2 hours to solve them.

Note that the penalty for the wrong submission in this round (and the following Div. 3 rounds) is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as trusted participants of the third division, you must:

• take part in at least two rated rounds (and solve at least one problem in each of them),
• do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

The problems for this round were invented by MikeMirzayanov and prepared by me Supermagzzz and Stepavly

Thanks to MikeMirzayanov for platforms and coordination of our work. Thanks to Sho, kocko, brian, Crazy_hedgehog, manta1130, Rox, Gassa for help in round preparation and testing the round.

Good luck!

</almost-copy-pasted-part>

UPD: Editorial is published

• +475

 » 9 months ago, # |   +377 It seems that the preparation of div3 rounds is less and less fit into vovuh's schedule. It will be great if Supermagzzz and Stepavly work together and they will take the initiative. Please support them!
•  » » 9 months ago, # ^ |   +111 We need to support the few writers we have, as Div3 rounds do not take place that often.
•  » » » 9 months ago, # ^ |   -37 Is Mike said something else?
•  » » 9 months ago, # ^ |   -45 sir plz make sure the problem quality is good, otherwise a lot of the times problems are not that good.
•  » » » 9 months ago, # ^ |   +1 stop making new user ids until you perform well :P
•  » » 9 months ago, # ^ |   -27 vovuh problems are easier though
•  » » 9 months ago, # ^ |   +46 Such a great pair betweens Supermagzzz and Stepavly. They work together in every contests. Thank you for another div 3 round.
•  » » 9 months ago, # ^ |   +10 Hey, can you make sure that problem changes are added to the problem page too? An announcement about a problem is just posted on the main page and doesn't appear on the problem page after refreshing.
 » 9 months ago, # |   +14 My chance for becoming expert :D
•  » » 9 months ago, # ^ |   0 +1
•  » » 9 months ago, # ^ |   +5 I see mikasa <3
•  » » » 9 months ago, # ^ |   0 <3
•  » » » 9 months ago, # ^ |   0 i see luffy
•  » » » » 9 months ago, # ^ |   0 <3
•  » » 9 months ago, # ^ |   +1 Congrats! Very glad to you!
•  » » » 9 months ago, # ^ |   +2 haha, ratings not updated yet! let's not count the chicken before it hatches :P
•  » » » » 9 months ago, # ^ |   0 I guess, you didn't know about CF-Predictor extension. Don't worry, you're going to be an expert!
•  » » » » » 9 months ago, # ^ |   0 Ohh, great extension. Thanks for the information :)
•  » » » » » 9 months ago, # ^ |   0 Tell me mine plz..
 » 9 months ago, # | ← Rev. 4 →   +4 Finally, the almost-copy-pasted-part joke is back.
 » 9 months ago, # |   0 My chance for becoming pupil.
•  » » 9 months ago, # ^ |   -22 your chance for becoming red tbh
•  » » 9 months ago, # ^ | ← Rev. 3 →   0 Same here, are YCCE namaskar namaskar [Umred cha aho:v]
 » 9 months ago, # | ← Rev. 2 →   +50 Thanks to Supermagzzz and Stepavly for preparing the div. 3 contest.
 » 9 months ago, # |   -121 Supermagzz(after cracking "almost-copy-pasted-part" joke)- I am Komedian.
 » 9 months ago, # | ← Rev. 3 →   0 Hoping that the problem statements would be as short as possible. Also my chance for not to go back to pupil.
 » 9 months ago, # |   +13 Why there are 2 Hello?
•  » » 9 months ago, # ^ |   +2 Because of almost copy paste.
 » 9 months ago, # |   0 Awesome! Good luck to everyone participating!
 » 9 months ago, # |   0 "You will be offered 6 problems (one of them is split into two subtasks)"Will the 2 subtasks count as 1 or 2 in the score?
•  » » 9 months ago, # ^ |   +7 2
•  » » » 9 months ago, # ^ | ← Rev. 2 →   -7 Your rank graph is motivating :-)
•  » » » 9 months ago, # ^ |   -7 you have come a long way...inspiring
•  » » » 9 months ago, # ^ |   +1 Your graph is a true motivation for me
•  » » » 9 months ago, # ^ |   0 Thank you _believe_ chaudhary_19 ritikagarwal!
•  » » » » 9 months ago, # ^ |   +3 Welcome, but really don't know why guys just see the color of the handle and downvote the comments :(
 » 9 months ago, # |   +27 Thanks a lot for this DIV3 contest! Supermagzzz && Stepavly
 » 9 months ago, # | ← Rev. 3 →   +51 SpoilerMeanwhile Red Coders in every Div 3 contests be like :from Imgflip Meme Generator
•  » » 9 months ago, # ^ |   +2 More like completing the round within 45 minutes.
 » 9 months ago, # |   +2 Hoping, that I don't mess this round up with silly and lengthy implementations.
 » 9 months ago, # |   +16 Hoping to see good problems, Supermagzzz and Stepavly, thanks for this round.
 » 9 months ago, # |   +9 Hope difficulty level of problems will increase smoothly.
 » 9 months ago, # |   +1 Having a rating of 1601 is good thing or bad thing before a DIV 3 contest?
•  » » 9 months ago, # ^ | ← Rev. 2 →   +20 Good, atleast u reached expert :)
•  » » » 9 months ago, # ^ |   +43 Good, at least u reached a four-digit rating
•  » » » » 9 months ago, # ^ |   +38 Good, at least you have a rating
•  » » » » » 9 months ago, # ^ |   0 Good, at least you are alive.
•  » » » » » » 9 months ago, # ^ | ← Rev. 2 →   -10 Good, at least you are in my hellDont downvote me plsss just for funnn
•  » » » » » » » 9 months ago, # ^ |   0 Good,at least your heaven is in my hell.
•  » » » » » » » » 9 months ago, # ^ |   0 This is.. taking a weird turn
•  » » » » » » » » » 9 months ago, # ^ |   0 brother can you tell me why i didn't get any rating even i solved problem A and submitted successfully and accepted. my current rating is 595 which is same as before the contest. can you please help me out what actually happened. waiting for your reply!!!!
•  » » » » » » » » » 9 months ago, # ^ |   0 rating changes take time
•  » » » » » » » » » 9 months ago, # ^ |   0 but it's been more than 15 hours but my rating is still same.
•  » » » » » » » » » 9 months ago, # ^ |   0 yes this usually happen in div 3 because there is 12 hrs hack phase
•  » » » » » 9 months ago, # ^ |   +8 On the behalf of a person not having any account -> Good, atleast you have an account
•  » » » » » » 9 months ago, # ^ |   +10 The joke is ruined when you explain it
 » 9 months ago, # |   +3 While I like vovuh's div3s a lot, it'll be a breath of fresh air to have new writers! Hope you guys have a nice round prepared for the contestants !
 » 9 months ago, # |   0 I think it will be a good contest!Good luck to everyone!
 » 9 months ago, # |   0 Note the sub-tasks, it can make or break your round. Waiting for the distribution to see whether its C1, C2 or D1, D2.
•  » » 9 months ago, # ^ | ← Rev. 3 →   0 You can't see before the contest
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 I can't tell you before the contest which ones will be subtaskForgot this might not have scoring distribution. So subtasks are profitable to solve first!
 » 9 months ago, # |   +3 i am a newbie and these contests are very much helpful :)
 » 9 months ago, # |   +1 First competetion for me on codeforces can I try ?
•  » » 9 months ago, # ^ |   +2 yes you should :)
•  » » 9 months ago, # ^ |   +2 Of course! Everyone started with their first contest.
 » 9 months ago, # | ← Rev. 4 →   +4 This contest I will be pupil.
•  » » 9 months ago, # ^ |   +3 Are you crazy dude?
•  » » » 9 months ago, # ^ |   +3 No.
•  » » » 9 months ago, # ^ |   -18 once a lodu always a lodu.
 » 9 months ago, # |   0 Please have more Div 3 Rounds!.This is not just good for beginners since (Div 2 and Edu Rounds can be a bit overwhelming) but also good for Codeforces since the amount of people registering(and participating) in Div 3 Rounds is the highest.
•  » » 9 months ago, # ^ |   +1 I am agree with you.
 » 9 months ago, # |   +2 So just a doubt regarding the question involving subtasks, if we solve both the subtasks it will be counted as solving 2 separate questions, right? (Since this is a Div3 round so each question has equal weightage, hence the number of solved problems matter.)
•  » » 9 months ago, # ^ |   +1 Yes if you are confident its better to do the harder one first. That way you will save time, against doing them one by one.
 » 9 months ago, # | ← Rev. 2 →   +14 Whenever I see a div-3 round announcement, the first name comes to my mind is vovuh :)
 » 9 months ago, # |   0 My chance to become Pupil
 » 9 months ago, # |   0 when I see div.3 then I become very happy. happy coding.
 » 9 months ago, # |   0 I started on CF a month back. In the initial rounds of Div-2, I could barely code for problem-A. After a week, I started seeing a pattern and gradually I became able to solve problem-A (& sometimes problem-B as well). By 'solve', I mean that I could unravel the problem, understand what is asked to be done and then I would try to code. I often take over an hour also for coding them. I have never been successful in submitting a correct solution to any problem and twice I have exceeded time limit. I am still trying to understand how I lose or gain the points after the contest is over. If someone can point me to a detailed blog about it, I'll be grateful. All I want to say is that it is great to see awesome coders here and learn from their codes. I appreciate the effort it takes to create programming contests. Kudos to everyone involved in it.
•  » » 9 months ago, # ^ |   -17 first try codechef long challenges and try to solve atleast 3 .Codeforces is for decent coders like me dude.
•  » » 9 months ago, # ^ |   0 Bro, my condition is the same as you, I can solve problem A of almost all rounds not counting Div-1. I think its best to give some time to simple questions
•  » » 9 months ago, # ^ |   0 do easy questions on codeforces problemset sort questions by rating do attempt 800-1500 rating problems....study stl(from gfg, topcoder articles etc.) when you become comfortable with solving 2 quest of div2 (sometimes 3 ques) start learning data structures and algo separately.
 » 9 months ago, # |   +4 All the best to everyone in div. 3..... Hoping to see good problems, Credits to Supermagzzz and Stepavly!!!!
 » 9 months ago, # |   +5 MY chance of becoming Newbie.
 » 9 months ago, # |   +4 Good luck everyone!
 » 9 months ago, # |   +1 I hope i do better in this round since its division 3 ....i dont know i am just not able to solve the third question in div 2 and sometimes even the second one.....i guess div 3 is for noobs like me and they should organize it more
 » 9 months ago, # |   0 exicted for the div 3 contest , hope the problems are good
•  » » 9 months ago, # ^ |   0 dude Buy some clothes before being excited :3
 » 9 months ago, # |   +3 good luck guys .. happy coding!
 » 9 months ago, # | ← Rev. 2 →   +62 Finally, div4 In caseno negativ, just meme :)
 » 9 months ago, # |   +21 While the problems were fine, I think E and F should be more difficult than this.
 » 9 months ago, # | ← Rev. 2 →   0 ㅤ
 » 9 months ago, # |   -43 The comment removed because of Codeforces rules violation
 » 9 months ago, # | ← Rev. 2 →   +23 Its a very very good round. Thanks a lot to authors and their team for it. Keep going!
 » 9 months ago, # |   -9 I hate div3s more than anything in this world
•  » » 9 months ago, # ^ |   0 A great man once said that improvement is the most certain thing in life. There'll be both good days and bad days. If we keep learning and practicing, we'll see the improvement for sure.
 » 9 months ago, # | ← Rev. 3 →   +4 My worst round, which I enjoyed.Great Problems, but I don't know what happened to me or test cases are very tricky. I have tried to solve from A — F but only A and C passed the test case.
 » 9 months ago, # | ← Rev. 2 →   +26 What was the idea behind the different input and output in E1 and E2? You could fix k = 2 and m = 3 and still write them into the input, and I find it unfortunate that my solution with modulo didn't work in E1, but did in E2. The last sentence of the problem statement, "You must output the exact value of the answer.", is in my opinion contradicting to "you DON'T NEED to output the answer by modulo.", especially when the word "NEED" is written in caps.Usually, you can just submit the hard version also for the easy problem.Edit: I enjoyed the contest besides that, thanks for it!
 » 9 months ago, # |   0 Can someone give some good cases for D??
 » 9 months ago, # |   +2 Great problems
 » 9 months ago, # | ← Rev. 2 →   0 How to solve D?
•  » » 9 months ago, # ^ |   0 soryy, it should be D.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   +2 You can edit the first comment. UPD(MY EDIT) : The user editted.
•  » » » 9 months ago, # ^ |   0 if all the elements are equal and the total sum of the array is S, then you can find what all the numbers will be equal to. For any array size N, it will be (S / N). Simulate to check if its possible to convert all of them into (S / N) and print.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 ㅤ
•  » » » 9 months ago, # ^ |   0 Try all the prefix sums possible in the array. Complexity is O(n^2), it works since n is 3000. for (prefix sum: [1...i]) { how many moves to make all elements equal to the prefix sum from i+1..n ?, if it is possible? Answer is minimum moves from all possible prefix sums. } 
 » 9 months ago, # | ← Rev. 3 →   +34 E1 was available on GFG. Similar idea of E2
•  » » 9 months ago, # ^ |   -6 damn it why didn't i google
•  » » 9 months ago, # ^ |   +57 Oh, sorry. I came up with the idea of the problem completely independently. By the way, is there really E2 there?
•  » » » 9 months ago, # ^ |   0 No matter sir. We enjoy, we learn from the contest , thats great.anyway great contest !!
•  » » » 9 months ago, # ^ |   0 E2 idea was the same just adding NcR.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 The above was just for E1 and could be modified to E2 after adding NcM. But This link solved both E1 and E2. Just put a mod there.
•  » » » 9 months ago, # ^ |   0 I hope it will not affect the rating as I solved this question independently.
•  » » 9 months ago, # ^ |   0 hey buddy can you tell me in E1 does order of triples doesn't matter or they will considered as different triples as diff of max and min will be same for all different ordered triples. As on gfg it was said that changing order will give same difference but could not it will change the no of triples. sorry for complex english.
 » 9 months ago, # |   0 On problem E (easy version)What if the input is all ones (1 1 1 1 ...) (length 10^5). Choose 3 from 10^5 would be very huge. Is there something I missed?
•  » » 9 months ago, # ^ | ← Rev. 3 →   +10 It just $\dfrac{10^5 * (10^5 - 1) * (10^5 - 2)}{6}$, around $1.6 * 10^{14}$ and still fit in long long.
•  » » 9 months ago, # ^ |   +8 Iterate through the array to choose one element to fix. Notice that there are (n-i) choose 2 ways to pick the other two elements in this case. The answer will just be $\displaystyle\sum_{i=1}^{n-2}{n-i \choose 2}$, which should fit in a LL.
 » 9 months ago, # | ← Rev. 2 →   +24 Nice round, but why don't you just write k and m in the input of E1 for convenience? It took me about 10 minutes just to realize how I went wrong in E1 although I got AC in E2.
 » 9 months ago, # |   0 How to solve D
 » 9 months ago, # |   0 Nice contest. I enjoyed the problems very much. Thanks!
 » 9 months ago, # |   0 Hey. Could someone let me know why I received RE on problem E1. https://codeforces.com/contest/1462/submission/101345065I tried looking for a mistake but I couldn't find how I received run time error. Everything was correct until this test case. If someone could let me know why that would be awesome :)
•  » » 9 months ago, # ^ |   0 Your long long is overflowing. 10^5! is huuuge.
•  » » 9 months ago, # ^ |   0 Integer overflow is there in your code while calculating factorial.
•  » » 9 months ago, # ^ |   0 In test five, I believe your program is finding $\dbinom{200000}{2} = \dfrac{200000!}{2! \cdot 199998!}.$ This is probably giving an integer overflow.You can just compute $\dbinom{n}{2} = \dfrac{n(n - 1)}{2},$ so there wouldn't be any overflow.
•  » » » 9 months ago, # ^ |   0 Thank you all!
 » 9 months ago, # |   0 How to approach F? I tried scanline with coordinate compression. Failed test case #2
•  » » 9 months ago, # ^ |   0 I did Binary Search and used Difference Array.
•  » » 9 months ago, # ^ |   0 Consider each range in sorted order, find how many ranges do not intersect with it on its left (suppose x) and right (suppose y). Minimise x + y.
 » 9 months ago, # |   +9 The problems were so cool !
 » 9 months ago, # |   +9 Thank you for the fun problem set! It felt like an AtCoder ABC :). D was really nice. EF could've been a little tougher.
 » 9 months ago, # |   +16 I found E1, E2 and F easier than I thought.
•  » » 9 months ago, # ^ |   0 I had been trying $F$. First I tried Fenwick Tree, messed with the implementation there. Then I moved to a simple binary search solution, messed there too. Just saw your solution for $F$, it's along the same lines of what I was thinking during the contest. You've written it pretty elegantly I must say. Thanks.Just up-solved it, now regretting my stupidity during the contest...PS: I agree that the complete set was pretty easier than I expected.
 » 9 months ago, # |   0 Is multiset is too slow for 2e5? or I had something wrong in my code for problem F: Your text to link here...
•  » » 9 months ago, # ^ |   0 Actually the problem is with distance function. Check the complexity of distance.
•  » » » 9 months ago, # ^ |   0 I think this works in log(n).
•  » » 9 months ago, # ^ |   0 distance takes constant time for random access iterators, otherwise linear. int z = distance(v.begin(), lower_bound(all(v), a[i].fi)); it is linear here. Also, use v.lower_bound(...) as lower_bound(v.begin(), v.end(),...) will not be logarithmic.
•  » » » 9 months ago, # ^ |   0 Thank you
 » 9 months ago, # |   0 I have hard coded all the answers for problem C. And then gave solution in constant time.
 » 9 months ago, # |   +7 WOW! Easy but Interesting problems.
 » 9 months ago, # |   0 Can someone tell me why this submission is giving runtime error in E1?
 » 9 months ago, # |   +22 Very cool contest, First time I solved five problems.Thanks, Supermagzzz and Stepavly
•  » » 9 months ago, # ^ |   0 I am still not able to solve 5 problems
 » 9 months ago, # |   +149 From the participant's perspective, the differences between E1 and E2 are quite significant. For someone who has just solved E2, they have to spend a few minutes revising their code, removing modulo from all the computations and deleting some lines about reading the input format. On the other hand, I see the value of having this subtask, since someone can solve E1 and not know how to solve E2.Issues involving subtasks seem to be quite frequent, and cause unnecessary trouble. Besides situations where input/output format differ, there are also situations where there is a queue and one has to decide whether to submit to both versions without seeing the verdict of one. There is also an issue if the author does not include all tests of the easy version in the hard version, and you can fail system tests on only the easy version.If the system was able to give you points for both versions of a problem when you submit only to the hard version, I think this would solve a lot of issues.
•  » » 9 months ago, # ^ | ← Rev. 2 →   +18 Btw Time Limits of E1 and E2 were different, and some people were hacked on E1 not E2 by Tl..
•  » » » 9 months ago, # ^ | ← Rev. 2 →   +92 I've now done over 100 successful hacks on E1,E2 and F combined, with E1 being by far the easiest to hack because of the lower TL. Almost all of my hacks come from TLEing solutions with slow IO with the most basic of max test hacks. For some reason E1,E2 and F all had $t \leq 2 \cdot 10^5$ but there were no test cases with a large $t$ inside the system. I really think that allowing $t \leq 2 \cdot 10^5$ is completely unnecessary to begin with. Having something like $t \leq 10^4$ or $t \leq 5 \cdot 10^4$ makes much more sense. But if for some reason the problem setters want $t=2 \cdot 10^5$ then they should at the very least put in a test with $t=2 \cdot 10^5$. It really isn't fun to solve a problem, just to have it get TLE hacked because of slow IO. Worth noting is that this time around I caused unexpected verdict 3 different times when hacking (unexpected verdict means that my hack broke one or more of the internal solutions). So not only was there not a single $t = 2 \cdot 10^5$ test case in the system, their code also somehow failed for $t = 2 \cdot 10^5$. So they didn't test for large $t$ internally either. What even was the point of allowing $t=2 \cdot 10^5$ in the first place?
•  » » » » 9 months ago, # ^ | ← Rev. 2 →   +70 I am very disappointed about how unprofessionally Codeforces contests were prepared recently. I will switch to competing in TOKI and Codechef.
 » 9 months ago, # | ← Rev. 3 →   0 Why didn't this 101339626 work?
•  » » 9 months ago, # ^ | ← Rev. 2 →   0 ㅤ
•  » » 9 months ago, # ^ |   +19 Check the value you assigned to mod variable, it should be "1e9 + 7" not "1e9*7".Feeling sad for you.
 » 9 months ago, # |   +1 D was the nicest one!
 » 9 months ago, # |   +8 Thanks Supermagzzz and Stepavly for a great contest. I think I will go to Pupil after this contest =))))
 » 9 months ago, # |   0 This felt like Div 4
•  » » 9 months ago, # ^ | ← Rev. 2 →   +9 Yeah, but the contest seems to be balanced as far as DIV 3 is concerned.
 » 9 months ago, # | ← Rev. 3 →   0 Could someone please tell me why this solution for E1 is surpassing the time limit. In my opinion it should run in O(n). (https://codeforces.com/contest/1462/submission/101338165)Am I missing something??
•  » » 9 months ago, # ^ |   +2 You are creating a vector of size 300000 for every test case. 2e5 * 300000 is a lot. It should work if you replace the 300000 with n+1 as it's given that 1 <= Ai <= n.
 » 9 months ago, # | ← Rev. 2 →   0 censored
 » 9 months ago, # |   0 Can somebody find why my solution to problem E1 link gives TLE
 » 9 months ago, # |   0 I like this Contest.
 » 9 months ago, # |   +2 What's the hack for E1? I want to know why my O(n) is giving TLE.
•  » » 9 months ago, # ^ | ← Rev. 4 →   0 Instead of iteration on 1 to n, you could have tried iteration on set of array nos to avoid unnecessary nos which are not present in array...Initialisation of array of 10^5 size in each test case is wrong..
•  » » » 9 months ago, # ^ |   0 yeah. I was in hurry. btw, any hack case for E1?
•  » » » 9 months ago, # ^ |   0 Oh shit. my bad. Didn't even looked at number of test-cases.
•  » » » » 9 months ago, # ^ |   0 But still it's stated that sum of n over all test cases does not exceed 2.10^5.
•  » » » » » 9 months ago, # ^ |   0 Yeah. but I am traversing the whole of the 10^5 array for every test case making it 10^10 in the worst case. I should have traversed only those elements which are in the list.
•  » » » » » » 9 months ago, # ^ | ← Rev. 2 →   0 It's actually your m[] array of 200000 size at the start of each testcase..
•  » » » » » » » 9 months ago, # ^ |   0 Does it matter whether it's 10^5 or 2*10^5?
•  » » » » » » » » 9 months ago, # ^ | ← Rev. 3 →   0 No...It's no of test cases × 200000 (Initialising whole array to 0)..Instead you could have used map to store frequency...
•  » » » » » » » » » 9 months ago, # ^ |   0 yes, my bad :sob
 » 9 months ago, # |   0 Can anybody plz tell me how to know on which case my submission got hacked?
•  » » 9 months ago, # ^ |   0 You have to resubmit the code after system testing.
 » 9 months ago, # |   0 The tests seem to be kinda weak — many solutions were TLE-hacked
•  » » 9 months ago, # ^ |   +4 Lots of Python solutions (including mine) were hacked because Python I/O is slow for 2*10^5 test cases.
•  » » » 9 months ago, # ^ |   0 Yeah same here
 » 9 months ago, # |   0 This contest made me realise how bad my implementation is right now
 » 9 months ago, # |   +1 This seems like someone is pretty blatantly farming hacks... if (s == "2047") cout << "YES\n"; else // correct answer  if (s == "2049") cout << "YES\n"; else // correct answer 
•  » » 9 months ago, # ^ |   +8 There is no advantage of hacking in educational rounds.
•  » » » 9 months ago, # ^ | ← Rev. 2 →   0 That is good to know. Thank you.It's kind of weird that something like this would be submitted then.Are Div 3. and Educational Round both considered educational rounds? I can find the rules for Div. 1 and 2, but not for 3/Edu.
 » 9 months ago, # |   +7 Giving this contest made me feel like Div 4's were back on the site.
 » 9 months ago, # | ← Rev. 4 →   0 i have created a fact arrary which stores the factoril of number and I used it to calculate nCR why this code is giving tle for E2 O(nlogn) solution....string solve(){ // CALM DOWN : — ) ll n,m,k; cin>>n>>m>>k; vector vec(n); vector pref(200000+10); for(auto &x:vec) {cin>>x;pref[x]++;} ll ans=0; for(int i=1;i<200000+10;i++){ pref[i]=(pref[i]%M+pref[i-1]%M)%M; ll ni=pref[i]-(i-k-1>=0?pref[i-k-1]:0); ll nn=pref[i-1]-(i-k-1>=0?pref[i-k-1]:0); ans=(ans%M+nCr(ni,m)%M-nCr(nn,m)+M)%M; } ret(ans); ret(""); }
•  » » 9 months ago, # ^ |   0 Just change all 200000 with n in solve func
•  » » » 9 months ago, # ^ |   0 ya i got accepted but i am mot getting one thing that 200000 is not so big to give TLE can u explain plz
•  » » » » 9 months ago, # ^ | ← Rev. 2 →   0 You iterate 200000 in every testcase so your complexity is t*200000*c(c = complexity for every iteration in for loop, t = numbers of testcases)
•  » » » » » 9 months ago, # ^ |   0 got it thanks
 » 9 months ago, # |   0 In many problems i see this line Spoiler... "The sum of "some variable" over all test case does not exceed "some value"".I cannot understand whats the significance of this line. i have submitted a pretty good number of solutions but i have never considered this statement i just ignore it. i want to know the importance of this line.
•  » » 9 months ago, # ^ |   0 Sum of n over all test cases does not exceed 200000. Say here n is length of array. This means if there are say 100000 test cases then n1+n2+......+n(1e5)<=2e5. So if some n=200000 then rest of them have to be 0. So 2e5+0+0+0...+0<=2e5. This helps setters to put more tests ig.
 » 9 months ago, # |   0 I performed even worse than my worsed performed contest till now.
 » 9 months ago, # |   0 I solved 2 questions in the div3 contest yesterday. and also this is my first contest my submission list shows that I have submitted 2 questions. but my contest list shows no items and my rating is also null. can anyone help me
•  » » 9 months ago, # ^ |   0 The final standings has not come yet. It will be updated soon.
 » 9 months ago, # |   +2 Why F is easier than E2?
 » 9 months ago, # |   0 Hoping to see div 3 rounds more frequently, and thanks Supermagzzz and Stepavly, for this round.
 » 9 months ago, # |   -8 Great appreciation to the whole Codeforces family. Thanks for such engaging contests providing for Competitive Programming specialists. Wish for more championships like this. Codeforces Round #690 (Div. 3) результаты
 » 9 months ago, # |   0 I submitted two problem yesterday; A & C and both were accepted.. But today it's showing only A as accepted and C is in queue... Is something wrong with my code?
•  » » 9 months ago, # ^ |   0 It is because of system testing. Wait a little bit, your submission in C will also be shown as accepted:)
•  » » » 9 months ago, # ^ |   0 It's okay now.. Thank you..
 » 9 months ago, # |   0 i need help with E1 problem. Close Tuples (easy version). I still don't understand why the result is 15 sets? With the number 1,2,3 we can form 10 sets. With 2,3,4 we can create 4 sets. With 3,4,5 we get 1 set and 4,5,6 more. This would give 10 + 4 + 1 + 1 = 16 : (
•  » » 9 months ago, # ^ |   0 yes idk why too
•  » » 9 months ago, # ^ | ← Rev. 3 →   0 yes, but one over count....in case (1 2 3)=10, we count (2,2,3)tuplein case (2, 3, 4)=(3 not 4);// here double count of (2,2,3) tuple with same position
 » 9 months ago, # | ← Rev. 2 →   0 Why does my O(N) Code in E2 gets TLE?Is this the power of frequent use of modular and long long typeEDIT: index mistake for the n
 » 9 months ago, # |   +1 E1 was easier than D problem.But overall we enjoyed solving another good contest.Thanks Mike,Supermagzz and Stepavly.
 » 9 months ago, # | ← Rev. 2 →   0 I streamed my virtual participation of this contest, as well as explaining solutions afterwards: https://www.youtube.com/watch?v=_6nyLsqM5Ec
 » 9 months ago, # |   0 when will the editorials be out?
•  » » 9 months ago, # ^ |   0 It's out already^^
 » 9 months ago, # |   +1 When the ratings will be updated??
•  » » 9 months ago, # ^ |   0 Till evening or in worst case, it will be in mid-night
•  » » » 9 months ago, # ^ |   0 Ok bro!
 » 9 months ago, # |   0 16 Hours and still no rating updates Hmmmm....
 » 9 months ago, # |   0 Is this contest rated?
 » 9 months ago, # |   0 Hello. Is this contest rated or not?
•  » » 9 months ago, # ^ |   +3 Read the announcement.
•  » » » 9 months ago, # ^ |   0 Ok. Thanks :)
 » 9 months ago, # | ← Rev. 4 →   0 Anyone please help..I can't understand why I am getting run-time error on my c++ code which is working fine on other platforms. https://ideone.com/wApUP0
 » 9 months ago, # |   0 I am not included in the final standing, i guess i am not recognized as trusted participant, but why ? I take part in at least two rated rounds (and solve at least one problem in each of them), do not have a point of 1900 or higher in the rating
 » 9 months ago, # |   0 When will rating be updated?
•  » » 9 months ago, # ^ |   0 till evening and worst at mid-night
 » 9 months ago, # | ← Rev. 3 →   0 Hello . Good job ! when will the ratings change ? 19 hours have passed since round 690, but the ratings have not changed yet. and it's so bad...
•  » » 9 months ago, # ^ |   0 There's no solution but to wait for a while:)
 » 9 months ago, # |   0 The logic of question D is easily available on Internet. So I haven't cheated, I used the code of dividing the Array into K subarrays such that all subarrays have same sum and than iterated K fron n to 1 and this was my logic. Any sort of matching in the code is completely a coincidence but I am not a defaulter and have hiven test with complete honesty. So I request Codeforces to give me my points back for this contest
 » 9 months ago, # |   0 I hope the rating changes are brought about faster in this round! Thanks Mike.Expect more of Div 3 rounds!
 » 9 months ago, # |   0 Hey, can anyone help me with realizing how this solution can be TLed https://codeforces.com/contest/1462/submission/101328873. Is it because of Java sort , or i just made a mistake ? Thanks for attention/
•  » » 9 months ago, # ^ |   0 I too got falsely accused for the natural solution to problem B in python!!
 » 9 months ago, # |   0 Respected Codeforces, I have valid proof that the basic code for Question D was published prior to the contest on gfg. I have not cheated by any means and I request to code forces to recheck my submission and give me my valid ratings Here I attach the link to that gfg problem, https://www.geeksforgeeks.org/check-if-it-possible-to-partition-in-k-subarrays-with-equal-sum/ You can refer it by yourself and confirm that I have not cheated and the source was freely available on the Internet and the match with other contestants is just a coincidence.Thank You
•  » » 9 months ago, # ^ |   0 Yeah, exactly. It is there on gfg, right. I have been penalized for the same reason. I have been using this code since when I learned this problem.
•  » » 9 months ago, # ^ |   0 Yes, I also got the message for the same code!
 » 9 months ago, # | ← Rev. 2 →   0 Hello, I received a message saying my solution to Problem D 101301240 and Targas's solution 101299306 to the problem are quite the same. And thus we both have been disqualified. Both Solutions might be very close, but we don't share the same exact code. I didn't share my solution anywhere, neither Targas did. We also don't know each others, so we don't have any way to communicate. We're not even friends on codeforces(I will add him after this coincidence as he thinks in the same way I do).I think it's unfair to accuse people for cheating just for thinking in the same way and writing codes that are similar but not the same. Your efforts for making the checker of copying are appreciated but I just figured out it needs some more work.Thanks for the great round and problems!
•  » » 9 months ago, # ^ |   0 Your solutions look very similar. In addition, you already participated out of competition. Let's not do anything. Unless you are a cheater, lightning rarely strikes the same point twice. You are unlikely to encounter such system behavior.
 » 9 months ago, # |   0 I did not receive a message for rating update, as earlier i used too. Can someone explain this? I am new to Codeforces.
•  » » 9 months ago, # ^ |   0 You only receive messages for rating update if you get 100+ rating points.
•  » » » 9 months ago, # ^ |   0 Thank You Sir!