F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

A pupil¡¯s problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1236    Accepted Submission(s): 477


Problem Description
Wei wei is a pupil. He is tired of calculating the quadratic equation. He wants you to help him to get the result of the quadratic equation. The quadratic equation¡¯ format is as follows: ax^2+bx+c=0.
 

Input
The first line contains a single positive integer N, indicating the number of datasets. The next N lines are n datasets. Every line contains three integers indicating integer numbers a,b,c (a¡Ù0).
 

Output
For every dataset you should output the result in a single line. If there are two same results, you should just output once. If there are two different results, you should output them separated by a space. Be sure the later is larger than the former. Output the result to 2 decimal places. If there is no solution, output ¡°NO¡±.
 

Sample Input
3 1 2 1 1 2 3 1 -9 6
 

Sample Output
-1.00 NO 0.73 8.27
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-05 13:59:41, Gzip enabled