2015华中科技大学ACM校赛初赛

From: 2015-05-09 13:00:00 To: 2015-05-09 18:00:00 Now: 2017-09-22 07:04:42 Status: Public

A - Student’s question

Time Limit: 1s Memory Limit: 128MB

Submissions: 787 Solved: 161
Description

    YYis a student. 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
Hint
Source