We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Summing Pieces
Summing Pieces
Sort by
recency
|
43 Discussions
|
Please Login in order to post a comment
what pre_all from editorial do?
What is wrong with the code?
What is wrong with the code from editorial?
I don't understand what do you mean contribution. Can you elaborate more?
"Now, count contributions of each number in the 'pieces'. For example, in pair (1,3), 1 and 3 contribute twice. in pair (1,3,6), 1,2and3 contribute thrice."
In addition, when n is large, wouldn't the second term of the artithmetic grow bigger than the first term and therefore yield negative result?
| 2^n-1 | p+2^(y) - 2^0 | p+2^(y-1) - 2^1 | p+2^(y-2) - 2^2|...
😂 sometimes you gotta read the Editorial and keep moving. I'm just glad there are smart people out there!