Solved by 92 users: ...
UserDateAttemptTimeCMSC
Council`13 oct 2006`C++300.02189
Vego`15 oct 2006`Python800.08208
Vego`15 oct 2006`Python700.07219
Vego`15 oct 2006`Python400.07230
Vego`15 oct 2006`Python500.07233
asp`27 may 2008`C++400.04237
mishik`08 sep 2007`C++400.01245
Pisov_37.5`16 dec 2013`C100.01247
Norbert`18 feb 2009`C++2300.47255
vladvis`16 dec 2013`C++200.01258
Vladimir_Sitnikov`05 nov 2003`C++400.02259
mishik`08 sep 2007`C++300.01269
DAV`02 feb 2010`C++900.01275
Kopyrin_37.5`16 dec 2013`C700.01279
 C++ 58 C 16 FPC 10 Kylix 4 Python 3 Java 1
` >  >  >  >  >  >  >  >  >  > `

Roots of polynom

Time limit = 5

Your program should determine whether all roots of 4-degree polynom have modulus less than 1.

Input Input consists of one line with 5 coefficients delimited with space. Coefficients are real numbers less than 1 000 000 in absolute value.

Input line

` 1 2 3 4 5`
corresponds to
` x4 + 2x3 + 3x2 + 4x + 5`

Note that coefficients may be equal to zero, and actual degree of the polynom may be less than 4. It's known that root's set is not empty.

In input tests there are no polynoms having maximum modulus of root equal to exactly 1.

Output One line with 'YES' (if absolute values of all roots less than 1) or 'NO' (otherwise).

 Input#1```1 1 1 1 0.5 ``` Output#1```YES ```
 Input#2```5 4 3 2 10 ``` Output#2```NO ```

Author:
Voroztsov Artem

<PREV | Problem set | Search related messages | NEXT>

 © acm.mipt DevGroupThe page was generated in 190ms