Given a polynomial p(x) If degree is A.P(1)=P(2)=P(3).....=P(A)=1. Also P(A+1)=B Tell P(A+C).
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Given a polynomial p(x) If degree is A.P(1)=P(2)=P(3).....=P(A)=1. Also P(A+1)=B Tell P(A+C).
Название |
---|
We know that $$$deg P = A$$$. Let $$$W(x)$$$ be $$$W(x) = P(x)-1$$$. Since $$$P(1) = P(2) = ... = P(A) = 1$$$, then $$$W(1) = W(2) = ... = W(A) = 0$$$. Let's observe that $$$deg W = deg P$$$, which means that numbers $$$1, 2, ..., A$$$ are all roots of polynomial $$$W(x)$$$. Thus,
for some real number a. Now, we know that $P(A+1) = B$ , so $$$W(A+1) = B-1 = a(A+1-1)(A+1-2)...(A+1-A) = a \times A! \implies a = (B-1)/A!$$$. So we know $$$W(x)$$$ polynomial formula — and thus, the formula for $$$P(x)$$$ (it's enough to add one). Hope I haven't made any mistake :)