Hello Egor can you please kindly explain us how you have solved the REALSET problem Decemeber cheff Thanking you Samuel
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 150 |
Hello Egor can you please kindly explain us how you have solved the REALSET problem Decemeber cheff Thanking you Samuel
Name |
---|
First off it should be obvious that cyclic matrix on A vector (i.e. matrix where first row is A1A2...AN, second row is A2A3...ANA1 and so on) should have zero determinant. There is a theorem that determinant of cyclic matrix is product of values of f in roots of one of order N, where f = A1 + A2x + A3x2 + ... + ANxN - 1, so in order for it to be zero one of those roots of one should be root of this polynom as well. But if one of them is root then it's conjugate is root as well, hence we only need to check whether f is divisible by x2 - 2a + 1, where a is real part of root