Given an array A of N integers, find a combination of four elements in the array whose sum is equal to a given value X.
First line consists of T test cases. First line of every test case consists of an integer N, denoting the number of elements in an array. Second line consists of N spaced array elements. Third line of every test case X.
Single line output, print 1 if combination is found else 0.
1 <= T <= 100
1 <= N <= 106
1 5 1 0 6 0
Testcase 1: 1, 5, 1, 0 are the four elements which makes sum 7.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.