Hello Egor can you please kindly explain us how you have solved the REALSET problem Decemeber cheff Thanking you Samuel
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
2 | maomao90 | 163 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
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