SlavicG's blog

By SlavicG, history, 4 months ago,

Hello Codeforces!

magnus.hegdahl and I are glad to invite you to Codeforces Round #767 (Div. 1) and Codeforces Round #767 (Div. 2) which will be held on Jan/22/2022 17:35 (Moscow time)! This round is rated for both divisions.

In each division there will be 6 problems and 2 hours to solve them.

We would like to thank the following amazing people:

Score distribution:

Div. 2: $500$ — $750$ — $1250$ — $1500$ — $2000$ — ($1500$ — $1000$).

Div. 1: $500$ — $750$ — $1250$ — ($1000$ — $750$) — $2250$ — $3000$.

UPD1: ak2006 and namanbansal013 have prepared video editorials for most div. 2 problems that will be available on ak2006's channel and namanbansal013's stream

UPD2: Editorial is out!

• +879

 » 4 months ago, # |   +153 As a tester, I am asking for your precious upvote.
 » 4 months ago, # |   +112 As a tester, pls help I can't figure out a decent as a tester comment
•  » » 4 months ago, # ^ | ← Rev. 2 →   +79 You can try this as a tester comment :) : "As a tester, pls help i can't figure out a decent as a tester comment"
•  » » » 4 months ago, # ^ | ← Rev. 4 →   +32 You might try this as a tester as a tester comment :): "You can try this as a tester comment :) : "As a tester, pls help i can't figure out a decent as a tester comment""
•  » » » » 4 months ago, # ^ |   +8 and you can try solve problems
•  » » 4 months ago, # ^ | ← Rev. 2 →   +5 .
•  » » 4 months ago, # ^ |   +10 You can take this as a reference.https://codeforces.com/blog/entry/93538?#comment-825976
 » 4 months ago, # | ← Rev. 2 →   +82 As a tester, I think problems are great. I highly encourage you to participate in this contest and check out all the problems.Tip: Having a cool profile picture like mine might help you do better :)
•  » » 4 months ago, # ^ | ← Rev. 2 →   -100 Tip: Having a cool profile picture like mine might help you do better :)So that means I will AK that round?
•  » » 4 months ago, # ^ |   0 How's Mine?
 » 4 months ago, # |   -17 I really liked your last contest and looking forward to have round like that again . Super excited :) .
 » 4 months ago, # |   +4 As the person who has seen the tester irl for 1 time I can say that he is very great dude (vanilla confirmed)
 » 4 months ago, # |   +44 As a participant, thanks for putting the contest on a weekend!
 » 4 months ago, # |   +70 As a Mihai supporter I wish all the Mihai supporters to get +300
•  » » 4 months ago, # ^ | ← Rev. 2 →   +53
 » 4 months ago, # |   +50 upvote announcement blog or negative delta
 » 4 months ago, # |   +37
•  » » 4 months ago, # ^ |   +22
•  » » » 4 months ago, # ^ |   +21
•  » » » » 4 months ago, # ^ |   +21
•  » » » » » 4 months ago, # ^ |   +17 mihai..
•  » » » » » » 4 months ago, # ^ |   +23
•  » » » » » » » 4 months ago, # ^ |   +23
•  » » » » » » » » 4 months ago, # ^ |   +6
•  » » » » » » » » » 4 months ago, # ^ |   +1
•  » » » » » » » » » 4 months ago, # ^ |   -47 what usually happens to these comment chains is that each comment gets +50 initially and then they're downvoted to hell
•  » » » » » » » » » 4 months ago, # ^ |   +57 what usually happens to the comment that breaks the chain is that the comment gets downvoted to hell.
•  » » » » » » » » » 4 months ago, # ^ | ← Rev. 3 →   +4 Women: I don't know why women live longer than menAlso men:
•  » » » » » » » » » 4 months ago, # ^ |   +3
•  » » » » » » » » » 4 months ago, # ^ |   0
•  » » » » » » » » » 4 months ago, # ^ |   0
•  » » » » » » » » » 4 months ago, # ^ |   0 mihai
•  » » 4 months ago, # ^ |   0 what has this community come to
•  » » » 4 months ago, # ^ |   -11
 » 4 months ago, # |   +16
•  » » 4 months ago, # ^ |   +36 stfu furry
•  » » 4 months ago, # ^ |   +10 stfu furry
•  » » » 4 months ago, # ^ |   0 stfu furry
•  » » » » 4 months ago, # ^ |   -17 stfu furry
•  » » » » » 4 months ago, # ^ |   -15 stfu furry
•  » » » » » » 4 months ago, # ^ |   +2 Stfu furry decreasing sequence !
•  » » » » » » » 5 weeks ago, # ^ |   0 My contribution became a decreasing sequence.
 » 4 months ago, # |   +55 Time to upsolve: https://codeforces.com/contest/1537 I actually did terrible that contest on vc and wish for more luck this weekend :prayge:
•  » » 4 months ago, # ^ |   +121 Don't ever upsolve! If a problem appears at one contest, what is the chance that it will appear again?
•  » » » 4 months ago, # ^ |   +9 Don't ever practice! If writing code is required to get points in a contest, what are the odds you'll need to do it again?
•  » » » » 4 months ago, # ^ |   +5 bruhh
•  » » » 4 months ago, # ^ |   +6 It's true that there are low chances of a problem appearing again. But for flex purposes upsolving is always recommended.
•  » » » » 4 months ago, # ^ |   0 Bro, he copied line said by Gennady.Check this outPS: Perfect timing
 » 4 months ago, # |   +17 This is a very well prepared round!!!
 » 4 months ago, # |   +42 As a tester, I would like to express my appreciation for the setters and coordinators for their efforts to make this round as enjoyable as it can be, and to invite everybody to participate in this contest!P. S. also my salary is contribution plz upvote
•  » » 4 months ago, # ^ |   +6 I really liked the idea of problem D. What a clean observation!!
 » 4 months ago, # |   +35 as a tester, i'm late for commenting
 » 4 months ago, # |   0 I'm only participating for the glorious problem statements
 » 4 months ago, # |   +10 as a tester, I think the problems are great. Recommend participation.
 » 4 months ago, # |   +6 As a tester, the problems are interesting and you will enjoy thinking about them and solving them.As the video editorialist for most div 2 and some div 1 problems I have tried to make the solutions intuitive and simple to understand so do subscribe to my channel
 » 4 months ago, # |   -51 Yet another Mathforces contest O_o
•  » » 4 months ago, # ^ |   +20 Little do you know
•  » » » 4 months ago, # ^ |   +5 as if I don't know
 » 4 months ago, # |   +1 Good luck! I wish every grey become green!
•  » » 4 months ago, # ^ |   +8 I am ready to sacrifice my Delta for your positive.We both become green after this.
 » 4 months ago, # |   +1 Looking forward to this round!Wish everyone good luck&positive deltaBtw, that's a great score distribution
 » 4 months ago, # |   +1 Good score distribution! Wish everyone good luck and positive delta)
 » 4 months ago, # | ← Rev. 2 →   -8 As in this contest, having official video editorials for every contest will be a great idea. This will motivate the content creators in terms of money and views and will be good for the whole CP community as well!!!
 » 4 months ago, # |   +105 As a tester, I had found that one of the problems could be solved by Googling. But now it's substituted with another great task, mission accomplished! Also, the round is really entertaining, please participate, remember to read all the problems and stay healthy <3
•  » » 4 months ago, # ^ |   -38 We could have won more rating but you fucked everything up :(
 » 4 months ago, # |   +6 UpvotesForces
 » 4 months ago, # |   +13 Wow that's quite a list of testers! Is it documented somewhere how to volunteer for testing a round?I'll earnestly try to participate in yours, but, like most rounds, it's 6:35am in my timezone :|
•  » » 4 months ago, # ^ |   +14 In Romania, we call the process to volunteer for testing as "sa ai pile". In all seriousness, the problemsetter is the one that asks you first to test their round. Then, it is up to the candidate tester whether they accept or not
•  » » » 4 months ago, # ^ |   +9 Ah, I thought tester responsibilities were something more formal curated by Codeforces coordinators. Gotcha, thanks for clarifying!
 » 4 months ago, # | ← Rev. 2 →   0 glhf
 » 4 months ago, # |   +14 Can't wait to see a new, well-prepared, interesting and fun cf round! GO-GO-GO SlavicG!
•  » » 4 months ago, # ^ |   +28 <3
•  » » 4 months ago, # ^ |   +21 As a tester, I want to see bigDuck on standings
•  » » » 4 months ago, # ^ |   +13 As a setter, I want to see bigDuck on standings
 » 4 months ago, # |   +72 As a tester, I believe all of you will enjoy these excellent probelms.
•  » » 4 months ago, # ^ |   +19 As a fellow tester, I completely agree. Good luck, have fun!
•  » » 4 months ago, # ^ |   +5 I hope this.
 » 4 months ago, # |   +5
 » 4 months ago, # |   +3 mihai
 » 4 months ago, # |   +5 Score distribution announced early.Thanks
 » 4 months ago, # |   +49 74TrAkToR is coordinator, so we should expect combinatoric problem which is in wrong order.
•  » » 4 months ago, # ^ |   +41 you are right
•  » » 4 months ago, # ^ |   +50 perfect prediction
 » 4 months ago, # |   +5 My gut feeling is saying that the problems in this contest gonna be very interesting, gonna get +ve delta
 » 4 months ago, # |   -44 As a participant pls upvote.
 » 4 months ago, # |   +5 WA is certain but it doesn't have to be ugly
 » 4 months ago, # |   +8 A palindrome round (767). Nice :)
 » 4 months ago, # |   0 Magnus from Norway. Sounds familiar to me...
•  » » 4 months ago, # ^ |   +20 It's the 25th most common male name here :D
•  » » 4 months ago, # ^ |   0 You certainly play chess.
•  » » » 4 months ago, # ^ |   0 Yeah. Biggest fan of Magnus Carlsen The GOAT :D
 » 4 months ago, # |   0 Can we see Mihai in problemset?
•  » » 4 months ago, # ^ |   +5 Of course, I'm sure Mihai is shadow ruler of contest
 » 4 months ago, # |   +21 First Norwegian round. (I think...) Let's go!!!
 » 4 months ago, # |   -65 I wish you all to get repeated TLE's and passed pretest but gets failed in system testing may your code gets skipped and you get a minimum of -100. all the worst :) . may you get down by h whole level.
•  » » 4 months ago, # ^ |   0 Not again (◔_◔)
•  » » » 4 months ago, # ^ |   -11 seems u have seen this XD
•  » » » » 4 months ago, # ^ |   0 Who? asked
•  » » 4 months ago, # ^ |   +3 Wishing you the same!!
•  » » 4 months ago, # ^ |   0 bad boi
•  » » 4 months ago, # ^ |   0 look at you, the only one who got -100 points probably -100 deltahope you stop wishing this bad things in every contest cause you are ending up eating your wish
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 Oh no no dont worry about my delta do you think if this were my main id i would have given the contest like this. Trying only once XD.
 » 4 months ago, # |   0 I am a new programming learner. I have just finished the basics of C programming. Can/Should I participate in this contest?
•  » » 4 months ago, # ^ |   +8 Yes participate
•  » » » 4 months ago, # ^ |   0 Thanks, I will. Pleased to see someone from my country.
 » 4 months ago, # |   -25 Hip Hop Listener upvote.
 » 4 months ago, # |   +5 I hope the server won't break down again(
•  » » 4 months ago, # ^ |   +2 No jinx plsssss.
 » 4 months ago, # |   -82 As a tester, I am asking for your precious upvote.
•  » » 4 months ago, # ^ |   0 Thats disrespectful to testers to say that... You are not a tester...
 » 4 months ago, # |   0 Wish all participants enjoy tasks and get higher ratings! ^-^
•  » » 4 months ago, # ^ |   0 Is it theoritically possible that all the participants get higher ratings ?
•  » » » 4 months ago, # ^ |   0 This is an easy task for Mike to do :D
•  » » » 4 months ago, # ^ |   0 ofc
 » 4 months ago, # |   +1 Hope this contest completes smoothly
 » 4 months ago, # |   +1 Cheaters better not cheat. Else I'll whoop your ass
•  » » 4 months ago, # ^ |   +6 "virtually"
 » 4 months ago, # |   0 Good Luck peeps!!
 » 4 months ago, # |   -17 abacaba
 » 4 months ago, # |   0 Why can't I submit my code?
 » 4 months ago, # |   -24 in div2 F1 what does "score of the optimal game" mean? average of all the possible scores? SlavicG
•  » » 4 months ago, # ^ |   +8 Use clarifications section for clarifications during contest
 » 4 months ago, # |   0 I hope that this time i won't get FST.
 » 4 months ago, # |   +47 I think that shuffling problems in div.1 is not a great idea.
 » 4 months ago, # |   0 Speedforces MemeHow to solve div2E.And is div2F1 some standard problem as some div1 participants solved that instead of div2E.
•  » » 4 months ago, # ^ | ← Rev. 3 →   +2 Not only theyI just looked at div1 stat and decided to solve F1 instead of E and it worked outPretty simple dp
•  » » 4 months ago, # ^ | ← Rev. 3 →   0 2E ended up being a logic puzzle instead of a coding problem. Once you solve the logic puzzle, the implementation becomes O(n^2).
 » 4 months ago, # |   0 Ad-hoc-forces!
 » 4 months ago, # |   0 Mihaiforces
 » 4 months ago, # |   0 i love problem B :)
 » 4 months ago, # | ← Rev. 2 →   +8 Problem A to D are too easy, especially Div1 D is much easier than usual .And I have a O(nlog^2n) solution to E , but it got TLE . So Sad ...
•  » » 4 months ago, # ^ |   -32 And problem B seems to be hard to implement . I don't like this round :(
 » 4 months ago, # |   0 Seems that Div.1 E has a way too strict TL? My $O(n\log^2 n)$ solution keeps going TLE. Or maybe the expected solution is $O(n\log n)$ then just ignore me.
•  » » 4 months ago, # ^ |   0 Yeah, O(n log n) is intended.
•  » » » 4 months ago, # ^ |   -14 Well, I have come up with an $O(n\log n)$ solution (requiring $O(1)$ LCA), and it seems a bit harsh to code. I guess it would be better to set both $O(n\log^2 n)$ and $O(n\log n)$ solutions as acceptable. Anyway great contest!
•  » » » » 4 months ago, # ^ |   +5 +1
•  » » » » » 4 months ago, # ^ |   +23 My $O(n\log^2)$ solution didn't pass but after changing it to $O(1)$ LCA it passed.But I heard that it is not needed, since we only need to find the vertex with the smallest $dfn$ and the one with the largest $dfn$.
•  » » » » » » 4 months ago, # ^ |   +18 An interesting thing is that I first read the statement wrongly . I mistakenly think we should work out the max of sum. I found it in the last 10 minutes when checking the example . So I changed some parts quickly, and have no time to make it faster.
•  » » » » » » » 4 months ago, # ^ |   +20 In fact, me the same, I even finished my 3k code and then found myself not passing the sample.But I used Kruskal and the problem become asking sum again!
•  » » » » 4 months ago, # ^ |   0 O(1) LCA. Never heard of that. At least now I know something like this exists. Thanks for your comment.
•  » » » » » 4 months ago, # ^ |   0
 » 4 months ago, # |   +3 How To solve C and D of Div2 ???
•  » » 4 months ago, # ^ |   0 D was DP i guess and I solved C as I build reverseMEx array(mex till i from n) and then brute-forced from being (might get TLE in sys testing)!
•  » » » 4 months ago, # ^ | ← Rev. 3 →   0 If any of the strings in the list is a palindrome, the answer is yes! If there is either zyx | zy for any string xyz, then the answer is yes! The trick is to check for zy because we are only storing strings in hashmap. To do this, we find for every ch in small alphabets if reverse(zy(ch)) belongs to hashmap then the answer is yes! Otherwise, the answer is no.
•  » » » » 4 months ago, # ^ |   0 Ah didn't thought about it , nicely explained!
•  » » 4 months ago, # ^ | ← Rev. 3 →   0 C: The basic idea here is to keep taking elements until the mex for the current set of taken elements cannot be increased by any element present in the remaining elements. Now to increase the mex of the current set of elements, mex itself is required to increase itself. So, I kept all the elements in a multiset and then checked if the mex of the current set of elements is present in the remaining elements or not. If it's not present then we can start a new set of elements from here. Else, just take the current element and then increase the mex till it can be increased. Now to increase the mex, I have created a hash table and put the current elements in there. Now, until the next element is not present in the hash table, keep increasing the mex. This is the basic idea. Code
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 D was mostly observation.Trivial Case: If the input strings are palindrome, then return True.Observations:Now the palindromes that can be created will be of length at least 4. If you break a palindrome of a given length only in segments having 2 and 3 only. Then the first and last segment will also be of length 2 or 3. I can construct a palindrome out of the first and last segment only. So I can have the following combinations of lengths: 3 3 2 2 2 3 3 2 Now all that's left to do is check if we can create a palindrome considering the current string as the last part.For this purpose, I can have previous strings in a set and then reverse the current string and check if it is present in the set or not. This part is easier said than done. Have a look at my implementation to understand it better. Code
 » 4 months ago, # |   0 Enjoyed the contest,and solved C after long time of not solving any Cs in contests, i liked that problem thanks!
 » 4 months ago, # |   +13 I regret ever making fun of line trees, I didn't pass E because I had no template for them QAQ
 » 4 months ago, # |   +3 Only If I got 30 more seconds I would have submitted D,!!
 » 4 months ago, # |   0 Great contestbut feel sad for sitting there trying to solve 2E for 70min but stuck at the last step
 » 4 months ago, # |   0 Is there a formula for 1628D2 - Game on Sum (Hard Version)?
•  » » 4 months ago, # ^ |   +5 $O(m)$ formula (can maybe reduce to $O(1)$)) after preprocessing: $\displaystyle k * \sum_{a = 0}^{a = m} \frac{\binom{n - a - 1}{n - m - 1}}{2^{n - a}}$if $m < n$. If $m = n$ then the answer is simply $k * n$.
 » 4 months ago, # |   +37 FMLI found an $O(n)$ formula for D2 instantly, but I kept treating $n, m, k$ as queries and completely forgot that $O(n)$ would just solve the problem...
•  » » 4 months ago, # ^ |   -8 Please share the formula.
•  » » » 4 months ago, # ^ |   +5 For $m > 0$, $\displaystyle \frac{k}{2^{n-1}}\binom{n}{m-1} + k\sum_{i=1}^{m-1} \frac{i+3}{2^{n-i+1}} \binom{n-i}{m-1-i}$Turns out this on OEIS as A193605 if you remove $k$ and multiply by $2^{n-1}$.
•  » » » 4 months ago, # ^ | ← Rev. 2 →   +10 Here's some intuition for how to find the formula.Take your DP solution for D1 and formulate it as a path on grid problem: you start at $(0, 0)$, you want to reach $(n, m)$, you have a $\frac{1}{2}$ probability of moving to $(i + 1, j)$ or $(i + 1, j + 1)$ from $(i, j)$, and if you reach a cell such that $n - i = m - j$, you can only transition to $(i + 1, j + 1)$ and add $k$ points to your score. Answer is expected score over all valid paths. Now you can count grid paths with binomial coefficients and powers of $\frac{1}{2}$.(The exact indexing might look different depending on your DP.)Submission for Reference
•  » » » 4 months ago, # ^ | ← Rev. 2 →   0 ((SUM(i=0 to m-1) (m-i)*(n choose i))/2^(n-1))*k
•  » » 4 months ago, # ^ |   0 Same, smh
 » 4 months ago, # |   +21 I declare myself the dumbest person on this planet when I realized after 40 mins that string of length 1 is always a palindrome, so you only need to handle strings of length 2 and 3.
•  » » 4 months ago, # ^ |   0 I never realized it at all, so you are definitely not the dumbest :|
•  » » 4 months ago, # ^ |   +1 I realized it only after reading this comment.my code had the cases (1,x,3) for all 1<=x<=3 as well(the numbers denote the length of the string)
 » 4 months ago, # |   0 Can someone tell me what is wrong with this code for D? I broke it into cases...failed pretests Code
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 Try on this test case:- 2 abc cba 
•  » » » 4 months ago, # ^ |   0 Thanks a lot! Turns out it was a typo when I was caching size 3 strings.
 » 4 months ago, # |   +20 Problem div2 E is my favorite problem I've seen in recent memory. :)
 » 4 months ago, # |   +41 Based 1C solution: Just steal constructions from math contests lol
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 Too bad I never practiced on such old ISLs in my high school years...
 » 4 months ago, # |   0 How to solve div2 promblem E?Is it should be divided into 2 * 2 grids to solve?
 » 4 months ago, # |   0 I could think out diagonal XORsum of problem E 10 minutes before contest over. that was close
•  » » 4 months ago, # ^ |   0 Unfortunately, I only got it 5 minutes after the contest (arghhh). As an aside, F1 looked pretty nice. Too bad I didn't have enough time to solve it. You don't see DP with fractions too often.
 » 4 months ago, # |   +39 A-D great stuff, thanks!
 » 4 months ago, # |   0 It was a nice contest. Could not solve C but learnt a lot. Well done authors! :-)
 » 4 months ago, # |   +9 Sometimes there are problems having very intuitive algorithms (but to prove their correctness requires time) so I'm wondering whether there are people eagerly submitting such intuitive algorithms without formally proving them. Those submissions still can get Accepted when they are lucky.After participating in several contests at Codeforces, I realize that perhaps I have to submit things very quickly, without carefully thinking about their correctness, otherwise I will get a low rank because of late submissions.
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 Do you think this is good? In other words, do you think it is common and acceptable to do such quick but not reliable submissions in competitive programming?(I don't like unreliable things, so I feel uncomfortable when I have to do such quick submissions.)
•  » » 4 months ago, # ^ |   0 That's what I did for today's CI thought I might get tle but got AC ;)
•  » » 4 months ago, # ^ |   +2 -is-this-fft- mentioned his style of solving problems in this Blog Piece of text, Para4 in the blogThat is roughly how I feel I solve problems: try to really understand the problem, gather insights about it. And at some point, you have found enough observations that you can piece together a solution. The solution isn't proved afterwards — the proof develops alongside the solution. It isn't always like this, but very often it is.I feel after a certain point it becomes difficult to solve problems without proving.
 » 4 months ago, # |   +7 who did place hacks format before output format in 2E? WHO DID THAT?
 » 4 months ago, # |   0 loved the contest! strong pretests and amazing problems ... :)
 » 4 months ago, # |   +25 Me reading Mihai as Mithai :)
 » 4 months ago, # |   0 I forgot to check if the given strings are palindrome and failed on Div 2 D
 » 4 months ago, # | ← Rev. 4 →   0 Python Code Link I feel like my solution to Problem D(Div2) is not correct but got accepted.Kindly suggest if my solution is wrong.
•  » » 4 months ago, # ^ |   0 i feelyou !
 » 4 months ago, # |   +10 Peculiar Movie Preferences Video Solution.Don't forget to like and subscribe!!https://www.youtube.com/watch?v=xBkDyMHVTJ0
 » 4 months ago, # |   0 Does anyone realise that after a few hours there will be the first 4000+ rated user in entire history of codeforces?
 » 4 months ago, # |   0 can someone tell me what's the error with my code for problem C: https://codeforces.com/contest/1629/submission/143707669. Here I have used mex array to store mex from a_i -- a_n. and mx to store maximum mex in the range.
•  » » 4 months ago, # ^ |   0
 » 4 months ago, # |   +38 Ratings updated preliminarily. We will remove cheaters and update the ratings again soon!
•  » » 4 months ago, # ^ |   +52 Looks like Mike has to think about the new name for 4000+ rated users real quick. Tourist is almost there
 » 4 months ago, # |   +7 Mihai is very abnormal person, i mean look at his movie choice.
 » 4 months ago, # |   0 My Submission Div2 C it is giving tle on test 5 can someone plzz help me out ??
•  » » 4 months ago, # ^ |   0 The link is broken. Didn't understand the idea, but if it's only tle, maybe it's because of initialising of set with 200000 values for each run.
•  » » » 4 months ago, # ^ |   0 yaa exactly this was the error. I changed it to n and it is accepted now. Thanks for pointing out. Dont know how can i do this blunder.
 » 4 months ago, # | ← Rev. 2 →   0 Could someone please point out my mistake for div. 2 D? Here is my submission
•  » » 4 months ago, # ^ |   0 nvm figured it out
•  » » » 4 months ago, # ^ |   0 What was the mistake ? Actually I am also getting error on same test case u got .
•  » » » » 4 months ago, # ^ |   0 try this 1 2 hfe fh expected output is "YES"
•  » » » » » 4 months ago, # ^ |   0 Yeah works fine on this.
•  » » 4 months ago, # ^ | ← Rev. 3 →   0 i think you don't try all possible ways every palindrome (> 3 in length) can have one or more from these 4 ways 1 : palindrome starts with 2 characters and ends with 2 characters 2 : palindrome starts with 2 characters and ends with 3 characters 3 : palindrome starts with 3 characters and ends with 2 characters4 : palindrome starts with 3 characters and ends with 3 charactersand the order of two strings because it is subsequencealso i think you forget to check if one of these strings is palindrome so the answer is yes
 » 4 months ago, # |   +34 As the Victor from 1628C - Grid Xor, why did you, mesanu, steal my grid????
•  » » 4 months ago, # ^ |   +20 As the Mihai from all the problems, if I steal your grid, I get your IOI medal.
•  » » » 4 months ago, # ^ |   +20 As your RMI team leader, I challenge you to get one this year and return mine, please
 » 4 months ago, # |   0 I think the samples are strong . I like it.
 » 4 months ago, # | ← Rev. 2 →   0 My AC submission 143728411 for Div2 C/ Div1 A gives a runtime error on this test case: 1 2 3 4 I'm not sure why this happens. Could someone perhaps explain why this happens?Update: Nvm, this test case isn't valid.
 » 4 months ago, # |   0 Got TLE in C. but when I look at the solution I realize that I used a set to identify MEX instead of counting the elements submission: 143691980. but I Don't know why it is creating such a big impact on time complexity? please someone clarify.
 » 4 months ago, # | ← Rev. 2 →   +11 accidentally put this comment not in the editorial :/
 » 4 months ago, # |   0 Question- Div 2: C: Meximum arraySubmission- link Readable Approach- declare vector ans; (while vector a has elements){ 1. find mex of a and assign it to nothis 2. push_back nothis to ans 3. if nothis == 0 { erase first element of a } else { create vector x with elements 0, 1, 2 ... (nothis-1) (while vector x has elements) { if a[0] is in x { erase it from x { erase a[0] } } } ans has the necessary answers- Doubts- Why did I get TLE? What is the time complexity of this approach? Or does this approach has problems? How to fix it? etc.
 » 4 months ago, # |   0 Hey, Div 2 Problem B i submitted the same code but in different C++ version, in C++ 17 it got accepted but in C++ 20 it gave me wrong answer and because of this i had 3 wrongs submissions, can someone please tell me why this happened, like the code work in one version but in the other newer version it gives WA? Code: - C++ 17 (AC) : 143715633 - C++ 20 (WA) : 143715622 Any help is appreciated!
•  » » 4 months ago, # ^ |   0 Short Answer: Never trust floating-point arithmetics. Use integer arithmetic instead to get accurate results. Long AnswerThe problem isn't because of the compiler version, it's because of floating-point arithmetic.Floating-point arithmetics(especially, float) are usually very likely to be inaccurate, because, unlike integer types, floating-point types can’t represent exact values. Also, they can give different results on different compilers or machines. For example, some hardware architectures may support advanced floating-point operations, and some compilers may use different floating-point instructions depending on the system.If you run the codes below by the “Custom Invocation” feature, you can see that GNU G++17 7.3.0 and GNU G++20 11.2.0 (64 bit, winlibs) give different results. // Input: 900000000 909090909 // 4545455.0000000000 (GNU G++17 7.3.0) // 4545469.0000000000 (GNU G++20 11.2.0 (64 bit, winlibs)) #include using namespace std; int main() { int l, r; scanf("%d %d", &l, &r); printf("%.10f", (r - l + 1) - ((r / 2) - ceil((float)l / 2) + 1)); return 0; } Don’t use floating-point types if you can go with integer types. If you absolutely need them, use double` instead.
•  » » » 4 months ago, # ^ |   +3 Oh thank you so much i will be careful next time!
 » 4 months ago, # | ← Rev. 6 →   0 Hi System. I don't Think that the similarity of tow random solution is a violations. I am very shocked from the similarity between me and this guy , but I swear it is a coincidence it could happen I don't know the other guy who he is and his not on my friend list either so please help me to keep my account and my rate . Please look in it. thanks ..
 » 4 months ago, # |   0 Why my solution is same as other when i dud the question myself...none of those person is my friend! Please look into this codeforces!
 » 4 months ago, # |   0 Hi system! I think there has been an error on your end as i have been given similar solution notification and I don't know any of the persons mentioned. And also my solution is quite unique compared to theirs (I went through them). Similar logic thinking of a problem is a very possible scenario and I think similarity of logic is not a violation. Kindly look into it!
 » 4 months ago, # | ← Rev. 2 →   0 vv
•  » » 4 months ago, # ^ | ← Rev. 2 →   0 .
 » 4 months ago, # |   0 MikeMirzayanov, one hour left for the contest #768, I see you've removed the cheaters but you haven't updated the rating yet, The new rating affects the selection of the section of some contestants between div.1 or div.2