<PREV Problem:
NEXT>
Solved by 92 users: ...
UserDateAttemptTimeCMSC
Council13 oct 2006C++300.02189 
Vego15 oct 2006Python800.08208 
Vego15 oct 2006Python700.07219 
Vego15 oct 2006Python400.07230 
Vego15 oct 2006Python500.07233 
asp27 may 2008C++400.04237 
mishik08 sep 2007C++400.01245 
Pisov_37.516 dec 2013C100.01247 
Norbert18 feb 2009C++2300.47255 
vladvis16 dec 2013C++200.01258 
Vladimir_Sitnikov05 nov 2003C++400.02259 
mishik08 sep 2007C++300.01269 
DAV02 feb 2010C++900.01275 
Kopyrin_37.516 dec 2013C700.01279 
Languages
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 DevGroup
The page was generated in 200ms

SW soft NIX
ID = 3.228.220.31