| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 152 |
| 3 | Um_nik | 146 |
| 3 | Proof_by_QED | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
|
+39
Indian Team -
|
|
0
Seeing that nobody has reposted this idea anywhere... Including in a comment above which described 4 ways of solving F I had actually explained my approach here Do check it out.. Still have queries, then feel free to ask! |
|
+4
Hey there! I saw quite a few comments regarding the solution for F... infact I was also pinged here. I had a different solution: Firstly, note that for going from x->y it is equivalent to go from x->gcd and gcd->y Which is further equivalent to go from gcd -> x and from gcd -> y and thus from 1->x/gcd, 1->y/gcd Now I will process the testcases offline. I go in increasing order of k. And a dp solution suffices, because the answer for a given number changes iff it is a multiple of k Reading the code will give a better understanding Code : 321493342 Hope I was able to explain well and that this solution gave you a clearer understanding. But if you still have any doubts, do feel free to ask them! |
|
0
Hello! Loved the contest Could we also get editorial for the same? |
|
+27
Maybe we can increase the number of rounds required to become a "trusted-participant". (infact a stricter measure would be to not increase their ratings till they become a trusted participant) For those arguing that what about people who join new? My reply is that the question simply boils down to, do you want to give preference to those who have been contests for a long time? Or those who just joined? I leave this to your discretion.. |
|
+74
Thank you so much for taking the time to update us and address the recent issues with Codeforces. I personally appreciate you taking the time to address the common queries despite dealing with some health and personal challenges. Your dedication and commitment, even in tough times, is both inspiring and deeply valued. Wishing you all the best and looking forward to seeing Codeforces back on track! Finally huge shoutout to Mike! |
|
+1
Auto comment: topic has been updated by ludo. (previous revision, new revision, compare). |
|
+9
I would like to take this opportunity, to spread my propaganda... Join evenvalue fan club !!! It has not only helped me, but also sav and beaten_by_ai to gain rating, and get the blessings of evenvalue |
|
+21
A different way to approach D:(Probably easier?) Solution : Solution We have to count the number of "bad" subarrays and subtract from $$$n\choose{2}$$$ + $$$n$$$. We count the number of "bad" subarrays with a median of exactly $$$x$$$ Let for example [l,r] be a "bad" subarray, with a[ $$$\frac{l+r}{2}$$$ ] = $$$x$$$ cnt[ $$$i$$$ ] denote number of numbers in ($$$a_1,a_2 \dots a_i$$$) less than equal to $$$x$$$ Then we have that cnt[ $$$r$$$ ] — cnt[ $$$l$$$ ] = $$$\frac{r-l+1}{2} \implies $$$ 2*cnt[ $$$r$$$ ] — $$$r$$$ = 2*cnt[ $$$l$$$ -1] — ($$$l$$$ -1) We can just store this, and check if there is an $$$x$$$ between [ $$$l$$$ , $$$r$$$ ] and increment This can be done using lower_bound. Hope you understand the solution, if you have any queries feel free to ask, and I'll try to help if possible. |
|
0
Congrats to tourist for 4000!!! I was wondering if there could be a live interview of tourist, by none other than MikeMirzayanov himself!(streamed on codeforces obv) |
|
+12
An alternate and direct solution for C(1995C - Squaring) : We will store the number of times we are squaring the $$$a_i$$$ as $$$cnt_i$$$. Initially $$$cnt[0] = 0$$$ Let the value of $$$cnt[i] = x$$$ and for the sake of convenience let $$$a[i] = p, a[i+1] = q$$$, we need to find the value of $$$cnt[i+1]$$$ Let $$$cnt[i+1] = y$$$. So, in other words, we need to find the minimum $$$y$$$ such that $$$p^{2^x} \lt =q^{2^y}$$$ Taking log on both sides, we get $$$2^xlogp \lt = 2^ylogq \implies x + log2(log(p)) \lt = y + log2(log(q)) \implies x + log2(log(p)/log(q)) \lt =y$$$ Hence, we directly get the value of $$$y$$$, and can keep doing this on and on, and find all the $$$y$$$ and simply sum them up. Edge Case Also note that $$$y \gt =0$$$ so make sure the remember this PS : For some reason $$$log2(log(p))$$$ — $$$log2(log(q))$$$ is giving WA, like I found the cases too, it is generally when $$$q$$$ is a power of $$$p$$$, but I could not get this flaw in the contest and missed this problem due by this :( Code Feel free to ask any queries if anything is not clear :) |
|
+9
Hello there! I had a funny little solution for B which involving Segment Trees. My code : 261728503 Solution : Let ans be the answer we have gotten. Notice that this that OR of all a[i] to a[i+ans-1] must be equal to the OR of a[0]...a[ans-1]. We iterate through all the indices, in the array and let k be the answer we have gotten uptil now. Two cases may arise : **Case 1 : ** The OR of a[i] to a[i+k-1] = OR of a[0] to a[k-1] This means k is good for this i, and we can go to the next position **Case 2 : ** The OR or a[i] to a[i+k-1] != OR of a[0] to a[k-1 This means that k has to be incremented. Notice that if we increase k by 1, we also need to decrement i by 1, I am not really sure about why I just got the intution of doing it, because we need to check one more case? And i can never go negative because eventually if i=0, we get the base case and it has to be true All these queries can be managed with a Segment Tree. Hope you understand the solution, if you have any queries feel free to ask, and I'll try to help if possible. |
|
0
Sadly no :( Although from Monday onwards it can be discussed, so wait for Monday :)))) |
|
+3
Everyone who gives APIO 2024 is a winner! |
|
+3
evenvalue I agree2.(2 is even) Hence by evenvalue thm, he will win APIO 2024! |
| Name |
|---|


