I think it would be great if codeforces had a place for reporting cheaters directly to some admin or something instead of making blogs about them after each contest.
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
I think it would be great if codeforces had a place for reporting cheaters directly to some admin or something instead of making blogs about them after each contest.
Is there any difference between 1ll and 1LL in C++? (I know, it's a really silly question)
Find the sum of the bitwise AND of the vertices on all connected subgraphs of a complete binary tree
This is the problem statement:
Bob decided to draw a binary tree. At the first step he draws a node and writes the number $$$1$$$ in it. At each step after this for any vertex that has a degree of 0 or 1 he does this: let the number in that vertex be $$$x$$$. Bob will draw two new vertices, draw and edge from each of them to this one and write the number $$$2x$$$ in one and $$$2x + 1$$$ in the other. below you can see a picture of the tree after 1, 2 and 3 steps.
Let the value of a graph be the bitwise AND of the numbers written on it's vertices and let $$$f(n)$$$ be the sum of the values of all conected subgraphs of the tree after $$$n$$$ steps. For example $$$f(1) = 1$$$ and $$$f(2) = 7$$$. Now answer these questions: (1) Find the value of $$$f(4)^3 \mod{\Delta}$$$. (2) Find the value $$$f(16) \mod{\Delta}$$$. (3) Find the value of $$$f(64) \mod{\Delta}$$$. Where $$$\Delta = 229939$$$.
I solved the first two parts like this: lets count the number conected subgraphs such that in the binary representation of their value the $$$i$$$th digit is $$$1$$$ for every $$$0 \leq i < n$$$ and then using this we can easily calculate the answer. But how do we find this number for a fixed $$$i$$$? we will run a DFS on the tree and visit only the nodes such that in the binary representation of the value written in them the $$$i$$$th digit is $$$1$$$. Then if we let $$$\textrm{sub}(v)$$$ be the number of such conected subgraphs roted at $$$v$$$ ($$$v$$$ is the number written on the vertex) then we have the recursive formula $$$\textrm{sub}(v) = (\textrm{sub}(2v) + 1)(\textrm{sub}(2v + 1) + 1)$$$. as you can see this algorithm works in $$$O(n\cdot2^n)$$$ wich is too slow for the third part of the problem. So for the third part I tried counting the number of conected subgraphs directly and without using a DFS but I couldn't get a formula for it. I would be thankful if you could give me a solution or a hint for the third part.
If someone cheats in the virtual contest, Will it cause ban his account?
Name |
---|