REALNO - Real Numbers

no tags 

Find whether there exists a pair of real numbers whose sum is in range (1, 2) in an array consisting of real number in the range (0, 2). If there exists such a pair print "found" else print "not found". (Double quotes only for clarity)

Note: all intervals given above are open intervals.

Input

First line is the number of test cases t (t <= 6),

then for each case number of real numbers in the array is given (n)

then in the next line the real numbers are given.

Output

Print the required answer, i.e., "found" or "not found".

Constraints

1 <= n <= 3*10^5

Sample

Input:
2
3
0.7 0.5 1.2
5
1.2 1.3 1.22 0.999 1.5

Output:
found
not found

hide comments
hodobox: 2016-08-10 17:12:39

The miniscule time difference scanf() makes from cin with sync(false) + tie(0) gives me AC. sigh time limits.

Reply: The problem is meant to be solved in O(n), and time limits are put in place to try to filter out O(n logn) or O(n^2) solutions

Last edit: 2017-01-07 18:54:55
Piyush Kumar: 2016-05-29 08:17:58

The question is solvable, but the time limit is somewhat strict!

Tej Bahadur Singh : 2015-08-20 21:01:20

got a new idea ..using scanf();tle gone...

kejriwal: 2015-07-28 13:35:53

Ohh boy..this was sweet !!

Bhuvnesh Jain: 2015-07-27 19:58:31

beautiful problem with a beautiful solution....

Raghav Aggiwal: 2014-10-29 12:07:31

use scanf printf to avoid tle..

sj: 2014-07-10 16:42:32

what must be the time complexity for this
please anyone help

Reply: O(n)

Last edit: 2017-01-07 18:53:32
kelaseek: 2014-06-15 09:52:03

funniest sum ever

Bharath Reddy: 2014-04-02 16:40:15

Easy one

GOKU: 2014-01-20 16:38:57

getting wrong answer.....plz help
any special test case


Added by:Aditya Gourav
Date:2013-10-06
Time limit:0.100s-1s
Source limit:500000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ADA95 C C++ 4.3.2 CPP