| # | User | Rating |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | maspy | 150 |
| 3 | Um_nik | 146 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 8 | Dominater069 | 131 |
| 9 | Proof_by_QED | 130 |
| 9 | AmShZ | 130 |
|
0
I don't know why I was accidentally added to the polygon of this contest before it started, but luckily I have retired, so it doesn't affect me much. |
|
0
very interesting |
|
+53
StO |
|
+78
E2 is amazing! |
|
0
no dp[i] stores the min number of balls that can be kept. |
|
+33
The solution is that we can construct the sets $$$s_1,s_2,s_3,...,s_k$$$, such that $$$s_i\subset s_{i+1}$$$. So we only care about when each element is added to the set. |
|
0
refer to the standard solution for better understanding |
|
0
Orz |
|
+8
We can save the min $$$dp_j$$$ such that $$$a_{j+1}=x$$$ for all x. |
|
+8
If we keep the $$$i-th$$$ ball , then the value is $$$dp(i−1)+1$$$. If we erase $$$(j+1,j+2,j+3,...,i)-th$$$ bals , then the value is $$$\min\{dp(j)|a[j+1]=a[i],j+1 \lt i\}$$$. |
|
0
On the announcement |
|
+16
If x|y != x , then y has a bit that x doesn’t have |
|
+18
Because if we pick the correct centroid the answer is correct |
|
+25
Thanks for your feedback! |
|
+36
Asuka Orz |
|
+75
Do I get TON |
|
+10
Thanks! |
|
+15
How to solve B |
|
0
orz |
|
+21
Is 0:35 too late for sleeping ? (Seems like a lot of Chinese people go to sleep after 0:00 , you can try to take a nap at noon to avoid drowsiness) |
|
+8
I solved D using a simple dfs . But the time complexity may be wrong . |
|
+129
He_Ren orz |
|
I don't think he's finished writing it, it might just be part of it :) |
|
+20
The problems are good . |
|
0
F1 is is brute force . You can implement it with map in O(nlog^2n). |
|
+54
It's all about comparing the number of people who write B wrongly in their room. |
|
On
BledDest →
2022-2023 ICPC, NERC, Southern and Volga Russian Regional Contest [Online Mirror, ICPC Rules], 4 years ago
+10
About Problem J : Spoiler Problem J is LP-Dual + Greedy . But the time limit is misleading . |
|
+70
I think MikeMirzayanov can find out the person abusing coach mode . |
|
+20
I hope there will be no anime in the problem description. |
|
+69
Why the mirror is delayed ? |
|
+18
Fixed now! |
|
+28
How can I participate the mirror . Why it said "There's no active contest for you (yet)." ? |
|
+1
Receive it now ! |
|
+25
I hope Div1 D will be harder next time . |
|
+18
I haven't received :( |
|
On
Dragonado →
CODEPAL : VSCode extension for CF [V1.7.0] (with some Fixes and Haskell Support), 4 years ago
0
Hello , why it says "compilation error!!!" when only warnings exist . |
|
+35
When will the rating be updated? |
|
+29
That is common in China :( |
|
0
This is a private online judge. |
|
+45
But if there is no evidence that the problem was intentionally copied, the round is unlikely to be unrated . |
|
0
On question F, I mistakenly thought that 1 is also a prime number, and I didn't have time to revise it in the end. |
|
+31
I haven't received any message from Huawei , how do I claim my prize? |
|
+41
Problem F is a good problem! |
|
+42
Problem E is very boring and complicated to implement. |
|
+140
Many people used random solution.So it will be unfair to people with fewer submissions. |
|
+2
What does the question mark in the leaderboard mean? |
|
+10
How to get my prize? |
|
+21
Choose one spanning tree of the graph , and do some greedy solution on the tree. |
|
+11
When will the system test start? |
|
+5
Can this submission for problem F be hacked? |
|
0
Can this submission for problem F be hacked? |
|
+24
I wish MikeMirzayanov could solve this issue . |
|
+26
Why the submissions were rejudged? |
|
0
This is not final test data. |
|
On
Newtech66 →
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022, 4 years ago
+1
FST now :( |
|
On
Newtech66 →
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022, 4 years ago
0
I mean the connected components formed by same color. |
|
On
Newtech66 →
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022, 4 years ago
+30
Random algorithm . |
|
On
Newtech66 →
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022, 4 years ago
0
By the way , The $$$O(n\times \sqrt{nlog_2n})$$$ solution may be easier to implement. |
|
On
Newtech66 →
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022, 4 years ago
0
The connected components are trees. |
|
On
Newtech66 →
Codeforces Round #819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022, 4 years ago
+40
Problem F is boring and hard to implement :( |
|
+11
Is problem E a famous problem ? djq_fpc solved it in 10min ... |
|
+51
Amazing approach. By the way, after I observe your recurrence I think there is a more simple way to explain it . Let F[A][B][C] be the answer of "a=A,b=B,c=C". Then consider add a character after the current string , ignoring the influence of the last three characters F[A][B][C] can be written as F[A-1][B][C]+F[A][B-1][C]+F[A][B][C-1] . But you need to subtract the cases that last three characters are "abc"/"bca"/"cab" and these string has never appeared in all but the last three. If A=B=C=1 ,then you need to subtract 3. If A+B+C>3 then the restriction is "The fourth-to-last character cannot be the third-to-last character -1" , there are two possibilities to choose the third-to-last character . So you need to subtract F[A-1][B-1][C-1]*2. |
|
0
Thanks :) |
|
+31
A different solution to Div1 D: $$$Construct(L,R)$$$ is a function that finds the edges in the component of [L,R] ([L,R] is connected). You can construct as follows: Let $$$z$$$ be the largest number satisfies $$$z \lt R$$$ and $$$[L,z]$$$ is connected. Let $$$x$$$ be the largest number satisfies $$$x\leq z$$$ and $$$[x,R]$$$ is connected. There is a useful property :
Then if you construct $$$[L,z]$$$ first , the only influence to $$$[L,R]$$$ are the segments $$$[y,R],(L\leq y\leq z)$$$ If $$$[z+1,R]$$$ is connected then the rest of construction is easy:
If $$$[z+1,R]$$$ is not connected . Then $$$[z+1,R]$$$ can be split into some connected components $$$[l_1,r_1],[l_2,r_2]...[l_k,r_k],[l_{k+1},r_{k+1}]$$$. The solution is also not hard:
In fact the last two part can be implemented together.Submission: 165734051 |
|
+16
F can be solved with "Entropy" (https://en.wikipedia.org/wiki/Entropy_(information_theory)) . You can split the positions into some groups , and each group includes at most B elements . You find the positions of 'F' of each group independently , and use Entropy to find the optimal choice . which can be solved in $$$O(2^{2B})$$$ for each group . Solution: 164420897 ,(B=12, and the number of queries is about 520 for n=1000). |
|
On
ch_egor →
Codeforces Round #802 (Div. 2, based on All-Russian olympiad in the name of Keldysh) [Rated], 4 years ago
+6
My solution to F: Spoiler The key idea of problem F is the horizontal distance is known which is $$$\sum abs(p[i]-q[i])$$$,where p[i] or q[i] is the column of the i-th one of the first or the second matrix . Then you need to minimize the vertical distance without changing the horizontal distance . If you minus the first matrix from the second matrix ,suppose the result is $$$a[i][j]$$$, and let $$$pre[i][j]=\sum_{k\leq j} a[i][k]$$$,then the horizontal distance is $$$\sum abs(pre[1][j]+pre[2][j])$$$,the horizontal distance won't change iff $$$abs(pre[1][j])+abs(pre[2][j])=abs(pre[1][j]+pre[2][j])$$$. So you need to adjust the '1's to make the condition above holds. Use dp to calculate the optimal answer. |
|
+21
F is two sat . You can make some variable : (a[i]<=x) is true or false , (a[i]>=x) is true or false. |
|
0
Why the number of possible numbers is $$$O(n+a_n)$$$? |
|
+25
Pretests for D are very weak . |
|
+16
Hint1 Answer <=2 Hint2 Draw a graph of the prefix sum.'('=1 ,')'=-1 Reversing a substring is rotate the fold line of some segment by 180 degree. |
|
+3
Maybe you will receive an email after removing the cheaters. |
|
+7
Hint
|
|
0
Yes |
|
+16
P2 : First , you need to calculate the scc of the graph. (If one scc has only one vertex , then it is impossible to win ). Second , if there is a vertex whose out degree is 1 , then merge the vertex and the vertex it can go to . Keep doing the second step until every vertex's out degree is not equal to 1. Each query is to check whether u,v is the same vertex. solution |
|
0
The number of possible MST is at most n-1. That is : sort the sequence . There is a number k : for all i<=k, there is an edge (i,n) . for all i>k ,there is an edge (1,i) |
|
+25
You can specify that the length of the path is exactly 40 or 39 by continuing moving up at the lca. solution |
|
+5
If the initial graph is a DAG or has no negative edge ,then the min cost flow can be solved in O(flow*N*log(n)) using Dijkstra. I think it is not rare in cp. |
|
On
ch_egor →
Codeforces Round #775 (Div.1, Div.2, based on Moscow Open Olympiad in Informatics, rated), 4 years ago
+121
Both D and E are hard to implement . |
|
+10
I do the greedy solution from small to big , and create many useless values in the map . It can be $$$O(n\log^2n)$$$ in the worst case. |
|
+1089
|
|
0
Will you please explain it ? |
|
+42
You can find that when the pair (x,y) is optimal , only if $$$\forall_{x \lt i \lt y} w_i \gt max(w_x,w_y)$$$. the number of such pair is $$$O(n)$$$. |
|
+19
I have a different solution to F (I'm not sure if it is correct): Spoiler Let c[i]=a[i]-b[i] You can maintain a tag "(A[i],B[i])" for each i . means c[i],c[i+1],c[i+2]...c[n] need to be added a fib sequence starting with (A[i],B[i]).Two tags can be merged easily . Every operations can be written as two tags in position l and r+1. If you want to know the exact sequence , you need to add the tag to c[i] for every 1,2,3...n.But if there is a position where c[i]≠0 , you can stop immediately . So because of the randomness of the Fibonacci sequence , I guess it is O(n). [submission:https://codeforces.me/contest/1634/submission/145427395] |
|
+39
Share my solution here : Spoiler If you know a tree is perfect match . Then u has an edge to father[u] iff size of the subtree of u is odd . When adding a node , you need to flip the parity in the path from u to 1 (root). So you can use HLD and segment tree to maintain it . But when the tree is perfect match ? In fact , when the number of nodes whose subtree size is odd is equal to $$$\frac{the\ number\ of\ nodes}{2} $$$ . Proof is easy . |
|
+3
Problem F is nice . But I wrote the dfs order as index ,and debug for about 40 minute (how can this pass the first 12 tests ???). And I found this silly mistake in the last 30 seconds .. |
|
+7
I only found this (in Chinese). |
|
0
|
|
+9
If you use a bitmask to maintain the young diagram . You can know the number of sequence which LIS is k (k<=m) in O(n2^m). my solution: https://atcoder.jp/contests/abc237/submissions/28953647 |
|
0
Ex and div1f of last round are exactly the same problem.(After building the graph) |
|
+28
For problem E . It seems that many problem requiring finding a path to any node in the tree can be turned into find the path to the ending nodes of "diameter" of the tree (the diameter here can be the sum of length,max ...). And the ending nodes of diameter can be easily maintain by segment tree. I first saw this trick here : https://codeforces.me/contest/1434/problem/D |
|
+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. |
|
+115
I have another solution to C : Spoiler Let paint the grid with white and black . (i,j) is black if i+j mod 2 =0, else it is white the value of A ,is the xor sum of "1" grids . And the xor sum of B is the xor sum of "2" grids and "1" grids. The xor sum of C is the xor sum of "3" grids and "2" grids . Now we can know the xor sum of all white grids . Do the same for the black one . We can get the answer . |
|
+5
+1 |
|
-32
And problem B seems to be hard to implement . I don't like this round :( |
|
+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 ... |
|
+36
I stuck in D for a long time ... |
|
0
thanks . |
|
+39
AGC055E Set Merging by antontrygubO_o. I am curious how can a human brain come up with such solutions ? |
|
+18
Yet another young LGM in China ,He_Ren orz. |
| Name |
|---|


