Problem A
Strange Project
Input: standard input
Output: standard output
Time Limit: 2 second
The input fine contains maximum 7 sets of inputs.
First line of each set contains an integer N (0<N<=10000). Each of the next N lines contains one floating-point number F (|F|<30000.0). The meaning of N is given in the problem statement.
The Input can have the same number twice or even more times. In such cases two same numbers should be considered different.
Input is terminated by a case where the value of N is zero. This case should not be processed.
For each set of input produce one line of output. This line contains the serial no of output followed by an integer which indicates how many of the NC2 selections will cause the value of the expression (a+b)*(1-a*b) to be positive. Look at the output for sample input for details. You can consider any value greater than 10-15 is positive.
5 8197.4013 -3622.8175 -1495.5118 -3958.2735 -678.2750 5 -1208.8234 1465.1943 2699.873 -6665.3587 -4344.6286 0 |
Case 1: 10 Case 2: 5
|
Problem setter: Shahriar Manzoor, EPS