| # | User | Rating |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | maspy | 150 |
| 3 | Um_nik | 146 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 8 | Dominater069 | 131 |
| 9 | Proof_by_QED | 130 |
| 9 | AmShZ | 130 |
|
0
After dijkstra from source vertex, you can start a dfs from the destination vertex. Number of shortest paths from source vertex to current vertex = SUM(number of shortest paths from source vertex to children of current vertex (given the child lies in the shortest path)). in dp1 source vertex is s, in dp2 source vertex is t |
|
+1
Yes, you should start from the vertex which has 0 in degree. |
|
0
Okay thanks! |
|
0
Is Q3 Lehmer's totient problem? Or am I missing something? |
|
+9
Reminder: Registration closes in 45 minutes. |
|
0
How to solve the fourth problem? I had assumed an unproven claim that the product of gcd of the numbers in the array a[] and some power of 2 should be the sum of numbers in a[]. It somehow worked for all the examples I could come up with during the contest :P |
|
0
Yeah right ... it did occur to me during the contest. Unfortunately I forgot to incorporate it in the code while coding. Thank you! |
|
0
Yes the precision is fine .... |
|
0
Is problem D probability + DP? I am getting WA in pretest 7 and I cant wait to know my mistake. My approach was this. We can see that the architecture of tournament is a complete binary tree. So each game will correspond to a node in this tree. We can also see that expected score for each subtree is independent (that is if the tournament comprised of only those players belonging to the subtree). If we fix the winner of the current subtree, we can independently compute the maximum expected score in each subtree that branch from the path joining the winner node in level 0 to the node corresponding to the current game, and add them to the expected score we get for fixing the current player. Am I being too vague? |
|
0
Can Div2 D be done somehow with ternary search. We can observe that the required dp expression will be unimodal but not monotonous. |
|
0
|
|
0
The problem asks us to find the largest subarray where all the numbers are pairwise co-prime. This means we need the largest subarray where each prime factor occurs only in one number. So for each prime factor of a number we can keep track of index of next number where it occurs as factor. Store the values in a new array. ( Consider the example After creating the new array, we use DP with dp[i] as length of the longest subarray starting from index i. Its not difficult to see that |
|
+7
In case you missed, refer to the following comments in order http://codeforces.me/blog/entry/52653?#comment-367266, http://codeforces.me/blog/entry/52653?#comment-367389 |
|
0
The basic idea is for each
Similarly find |
|
0
In problem E, why can't we club p1 and p2, and club c1 and c2, and have dp[u][p1 + 2*p2][c1 + 2*c2], which denotes number of ways to build the graph with the first u vertices, with (p1 + 2*p2) plugs in the previous level, and (c1 + 2*c2) in the current one? |
| Name |
|---|


