Can anyone explain the solution.. solution are posted on homepage, but it seems difficult to understand.
Can anyone explain the solution.. solution are posted on homepage, but it seems difficult to understand.
| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3390 |
| 6 | Um_nik | 3387 |
| 7 | tourist | 3384 |
| 8 | heuristica | 3322 |
| 9 | turmax | 3319 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 143 |
| 5 | AmShZ | 141 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | maroonrk | 134 |
| 9 | BledDest | 132 |
| 10 | qwexd | 129 |
| Name |
|---|



Let
. Then the answer to the problem is
(except for the case b = 1 where the sum is infinite). So we want to compute Fa(x).
We see that
. Hence, Fa + 1(x) = xF'a(x).
We have
. Then
, and so on. It's easy to see that
, where Pa is a polynomial of degree a. Substituting this expression into recurrent equation for Fa we get
Pa + 1(x) = xP'a(x)(1 - x) + (a + 1)xPa(x).
So we can compute the polynomial Pa using this recurrent equation.