Comments
On rng_58 → FHC 2016 Advancers, 11 years ago
0

Congrats rng_58 =D

Here is a short explanation .. First calculate all sums ( sum[i]= number of subarrays with sum 'i' ) This can be done in O(n^2) Now for each query, go through all sums ( for sum=0 to 2*10^7) and calculate the answer. HINT: for each sum 'i' find how many of s[i]'s will lie between L and R . So the complexity is O(n^2 + (10^7)*Q) . This is just an easy solution (and runs in time . For me it ran in 2.39 mins) . Can anyone discuss a better solution ??!

On Lewin → Wunder Fund Round 2016, 11 years ago
+21

Sorry for my ignorance . But isn't it P!=NP ??

On Edvard → Educational Codeforces Round 3, 11 years ago
0

I dont think so. I managed to submit my solution for D (Sad part is it got accepted :( ) . Still don't know whether the tests are final !!!

On darkshadows → DP on Trees Tutorial, 11 years ago
0

Oh ..One more doubt. Shouldn't dp_buffer[1] be initialised to '1' for each vertex.

On darkshadows → DP on Trees Tutorial, 11 years ago
0

Yep..Now its fine .

On darkshadows → DP on Trees Tutorial, 11 years ago
0

Shouldn't "dp_buffer[i + j] += f[v][i]*f[v][j]" (in pseudocode of problem 3) be "dp_buffer[i+j] +=f[cur_node][i]*f[v][j]" ?
Correct me if I am wrong ..

A great Editorial . Always a great pleasure reading POP's Editorials...Great Job... Really a useful one. Now I feel like I missed a Very Good Round.. Looking forward for ur future contests..