| № | Пользователь | Рейтинг |
|---|---|---|
| 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 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 157 |
| 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 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
|
+10
Don't worry, there is a strong evidence that he cheated, so probably he will be banned. |
|
+8
The Editorial will be published soon. |
|
0
Not necessarily. At least I used dfs and dfs only. I found all the components in the second graph and deleted such edges from the first graph, that connect $$$(u, v)$$$ from different components. Then I just calculated the amount of components $$$A$$$ in the first graph and the amount of components $$$B$$$ in the second graph, adding their difference $$$A - B$$$ to the answer. |
|
0
It seems like i completely overcomplicated D, because i solved it in $$$O(nA^2 + A^4)$$$. |
|
0
I know right? I just solved it performing necessary operations on each row and column once, and i repeat it 100 times. It passes all the tests. |
|
-8
Actually, prime numbers are pretty regularly distributed. So you can always find a prime number on a long enough segment. That's why yours and similar solutions work. |
|
0
You can also think about it this way (which is basically the same proof). If $$$m = n$$$, then you have $$$4n^2$$$ edges and at least one color should use $$$4n$$$ edges. But a forest on $$$4n$$$ vertices can have at most $$$4n - 1$$$ edges, so there's definitely will be a cycle. Also if $$$m$$$ is strictly greater than $$$n$$$, you can always consider any part of this graph with $$$2n$$$ vertices on the left, and exactly $$$2n$$$ vertices on the right, since this subgraph will contain a cycle for the same reason. |
|
0
Is it hard to rewrite your solution using stack to store dp states? |
|
+9
Just fill everything in dfs with odd numbers starting from 1. When you fill children of some node u, skip odd number x + 2, where x is the parent's odd number. In the end you'll have at most one unfilled node, so just fill it with even number x + 1, where x is the parent's number. It works because the difference of two non-adjacent odd numbers is an even number greater than 2. |
|
+24
It's pretty obvious, because if you use all $$$n!$$$ permutations, you get the same sum $$$S$$$ in each column. Then, if you remove any permutation, the sum in each column will be unique. For example if you remove something like $$$[1, 3, 4, 2]$$$, then the sum in each column will be $$$[S - 1, S - 3, S - 4, S - 2]$$$. |
|
0
Note that if you have a prime like 1021, then you can't reach 2077, and 2077 is not prime |
|
0
I'm actually wondering about problem E from Global Round. I tried different ways to bruteforce it, but it got either TL or WA. Then I just additionally bruteforced around $$$\sqrt{(z*y/x)}$$$, which is an optimal point for $$$f(u) = x * u + y * z / u$$$, where u — is the number of upgrades used. As you can see this function is simplified and doesn't consider the restriction given by $$$k$$$. Surprisingly it still worked, and I don't know why. Maybe the optimal point doesn't shift that much, or maybe it's just hard to make strong tests in this problem. |
|
0
Thank you for response! |
|
+16
Is it for students only? What if I lack math skills and want to participate in the Math Club? |
|
+11
Bitset |
|
+5
Good luck everyone! |
|
На
Ormlis →
Codeforces Round #857 (Div.1, Div.2, based on Moscow Open Olympiad in Informatics, rated), 3 года назад
-8
What I did is Spoiler just filled the matrix with random numbers, then for every 4x4 matrix I can adjust lower right number to make xor of all 4 numbers equal to the xor of 4 numbers in the matrix that is 1 cell above it. In the end all of 4x4 matrices will have the same xor |
|
-10
And this round |
|
На
Golovanov399 →
Codeforces Round 679 (Div. 1, Div. 2) and Technocup Round 1 editorial, 6 лет назад
0
This is for the sake of brevity. You can see that the edge CB is a little bit longer than AC. Apparently that means that there are some nodes on a path between B and C |
|
0
Then, for every pair of adj. element you take what is left one through one, so there goes (n + 1) / 2 elements in sum. It's easy to understand the proof by looking at pictures, unfortunately i can't attach them :( |
|
0
It's easy to see how does the answer look like by solving for n = 5. You can notice, that answer will have some pair of adjacent elements, and a few more(maybe 0), separated each from the others with odd number of elements, that will be deleted. Than it's trivial to prove it by induction for any n. If you want, I can draw some pictures to prove this solution |
|
+5
You can think of C as an "oeis" type task. To solve it, you have to cast a spell "Oh, it must be on oeis". Than you simply generate first few members of the sequence and google it |
|
0
What about n = 10^18? In the first test the answer is 1350851717672992089, but 3^38 > 10^18 and less than test's answer |
| Название |
|---|


