Given an array of integers , , , …, . Vector has to find the number of Fibonacci Triplets in the array meaning how many triplets are there such that and + = .
For example, , are Fibonacci Triplets but , are not.
First line of the input contains an integer () denoting the number of test cases. Next line contains an integer () denoting the size of the array. Following line contains N space separated integers , , , …, ().
For each test case, print the number of ways to choose a Fibonacci Triplet from the array of integers in a separate line.
1 6 2 3 3 4 7 11
In above example, all 3 ways to choose a Fibonacci Triplet are - , and which are , and respectively.
The input files are large. Please use faster I/O.