| # | 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 | 158 |
| 2 | adamant | 152 |
| 3 | Proof_by_QED | 146 |
| 3 | Um_nik | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
|
0
Thank You, I will check this. |
|
0
It's expected value not variance. |
|
0
Why my code for E is so slow? http://mirror.codeforces.com/contest/895/submission/32688252 |
|
0
How to solve D? I have only 2^20*50*20 solution. |
|
0
What is the name of your team? |
|
+18
Graph of masks and bfs from each mask from input. Graph contains the edge if two masks are different only on one bit. The answer is a vertex with the biggest distance. |
|
0
So I did but got tle on test31. |
|
0
Oh yes thx. |
|
+1
I had WA on pretest7 7 times. |
|
0
I have if(a != b) graph[a].pb(b) |
|
+4
What is wrong with my solution for E? I'm finding all cycles and trees. Answer is 2^(number of cycles)*product of sizes of trees. https://pastebin.com/FShyKDWw |
|
+6
Yes, but with priority_queue is easier. |
|
0
I've made simple dp on tree in E but fail. I assume that because of long long overflow. Is that good solution? |
|
0
I think that number of states is less than number of compositions of log(1e9) because when we divide by p^k than we subtract k from max{k1,...,ks}. Am I right? |
|
0
I think it is. For numbers bigger then 2 is easy but I can't show that for 2 number of states is small. |
|
0
What with states for 2? |
|
+13
When we have 3 leftmost points there must be a line which is going through 2 of those points. |
|
0
thx |
|
0
sort what? |
|
+6
How to solve div2 d? |
|
+3
Now I see. You maintain the ends of diameters. When You find new longer diameter you just update sets. It's fast because you can change set for vertex x only when it was a new end of bigger diameter. |
|
0
Maybe you should read about jump pointers. |
|
+3
Let mex of the array after (a xor x) be M than after M xor x you get a number which cannot be in the oryginal array. |
|
0
The same solution but you don't need trie. Normal sorted array is enough. You just make lower_bound for every bit. |
|
0
Is O(nsqrt(maxval)) good enough in c? |
|
+21
I see only that we can change ai+bk-i to 1,00000001^ai*1,00000001^bk-i and now it more similar to multiplication of polynomials. |
|
0
You can use one substring several times cabwabgab c-> ca > cab > cabw > cabwab > cabwabg > cabwabgab |
|
0
What with this test? gabbbbbbbbbcwabbbbbbbbbc |
|
+3
DP[i][a][b] — minimal number of steps for sufix i...n if in clipboard we have substring a..b |
|
0
Maybe you should write about your idea. |
|
0
Now I see They are not changing into a star. They are changing into centroid with stars. |
|
0
I think that there are graphs which cannot be changed into start. Degree of centroid in tree is unchangeable so if centroid don't have degree equal n-1 than we would never get a star. |
|
0
bad solution |
|
+3
The last one. |
|
0
I think that rejudge is still unfair. I usually start with problem D. I was sure that my solution is correct so I tried to find a bug and ultimately lost 2,5h. |
|
-32
I'm not sure if this round should be rated. |
|
+3
I spent 2,5 h. |
|
0
Oh the same. |
|
0
I've made the same and have 16 ans on pretest6. |
|
0
I've gotten 16 ans in D. I choose y random numbers and start. After that I choose the biggest number less or equal x. Then I go 1999-y-1 times to next number. What is wrong with this solution? |
|
0
I have AC. |
|
0
Maybe I didn't understand the problem but in your solution vertex 1 don't have any edges. |
|
0
I think so. When we have odd number of 1 then sum of degree is odd and this is wrong. When we have number of 1 even then we can match vertices with 1 but we are looking only on dfs tree. When you find partner for some 1 then you can change edges on path between those vertices 0->1 and 1->0. |
|
0
what with 1? |
|
+8
Only when there isn't -1 and number of 1 is odd we can't find subset. |
|
0
I think that it's possible to solve B with HLD but you can use normal max-seg-tree. |
|
+11
Where is editorial? |
|
0
It can't work because you cannot count dp with only those informations. You don't know what is best pair. Maybe optimal solution is take one number power of two and next one power of 5. |
|
0
OK, I had a bug. |
|
0
How to solve D? I did DP[i][k][s] — a maximal number of 2 in prefix [1..i] when we take k numbers and product of those numbers has s factors equal 5. 1 <= i,k <= n , 0 <= s <= 5000 It was too slow. |
|
0
I was asking for each bit. Then answer for some bit must be y or x xor y and then I have numbers which have only one y. For first number I just make binary search on numbers with this bit. |
|
0
Yes I have O(knlogn). |
|
+10
Normal max-segmenttree was enough. |
|
0
thx |
|
0
Why the answer is 5^(n-b)? 5^n — number of all possibilities. 5^b — number of all vectors in vector space. Why when one vector has k representations then every other must have k? |
|
0
I think that vertex which is common to all paths between a,b,c is one of the lca(a,b), lca(b,c), lca(a,c). When you find this common vetex x you can print the max length of xa,xb,xc. |
| Name |
|---|


