Comments
0

Essentially, you can remove one k factor by observing that, when you make a cut horizontally or vertically, it is always less costly to use one of the portions in full if possible, than further cutting both portions. Hence, now instead of looping over how much of the k to distribute into the two portions, you take the best of two options.

Minor Correction: In the last paragraph, you meant L[A[i]] instead of L[i] probably

They are quantum computers :) Programming Contest is just an excuse, Mike actually wants to test his quantum computers.

+26

Wow, really learnt a lot from this round, especially problems E and F. Please keep more of these rounds in future. Very nice initiative :D

On danilka.proCodeforces Round #330, 11 years ago
+4
On danilka.proCodeforces Round #330, 11 years ago
0

Lesson learnt: NEVER EVER use inbuilt pow function in codeforces. It behaves weirdly.

0

Nice solution :D I'll try to implement this

0

I tried to use polynomial interpolation on the axes independently, what did you do? I dont understand the part of your code where you are taking modulo 50

0

You are right.

0

Okay, let me see

0

Can anyone please explain why this output is wrong for C:

(0+(t-1)*(10+0*(t-2)))
(10+(t-1)*((0-10)+10*(t-2)))

I consistently got WA in pretest 1 and I think pretest 1 must be the sample.

On danilka.proCodeforces Round #323, 11 years ago
0

Suddenly everything in codeforces turned into russian language for me :D

On danilka.proCodeforces Round #323, 11 years ago
+6

What is pretest 3 on Div2D? My code passes (4 10 1 1 1 2 => 31)

Can someone please explain the solution to F in more detail: I do not get how we are calculating z2[s][cnt][col] using information from the next child of s. How can we use a value in the DP table that is being computed in the same "level". As in won't z2[ns][ * ][ * ] be uncomputed when we are trying to calculate z2[s][cnt][col]?

On ashish1610Invitation to Procon 2015, 11 years ago
0

I can assure you that we did not see this problem earlier. We'll look into this.

On ashish1610Invitation to Procon 2015, 11 years ago
+20

The intention of the contest is to promote programming among Indian Students :)

Could have done even better by taking a completeGraph(k)[or K(k)]. Refer: http://mirror.codeforces.com/contest/550/submission/11437241

Create K(k + 1) out of vertices 1..K + 1, remove (K - 1) / 2 edges, where all vertices chosen are different. Connect these k - 1 distinct vertices to the bridge vertex 2*k + 3. Connect 2*K + 3 to 2*k + 4. Now construct K(k + 1) out of vertices K + 1 .. 2*K + 2, and proceed similarly.

EDIT: LOL, just realised the editorial does the exact same thing.

On cgy4everCodeforces Round #270, 12 years ago
+6

Comment Deleted