For this Question: You are given an array A (distinct integers) of size N, and you are also given a sum. You need to find if two numbers in A exists that have sum equal to the given sum.The first line of input contains T denoting the number of testcases. T testcases follow. Each testcase contains two lines of input. The first line contains N denoting the size of the array A and target sum. The second line contains N elements of the array.

Constraints:
1 <= T <= 100
1 <= N <= 10^4
1 <= sum <= 10^5
1 <= A[i] <= 10^4For each testcase, in a new line, print  "1"(without quotes) if any pair found, othwerwise print "0"(without quotes) if not found.Sample Input
2
10 14
1 2 3 4 5 6 7 8 9 10
2 10
2 5

Sample Output
1
0

Explanation:
Testcase 1: arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and sum = 14.  There is a pair {4, 10} with sum 14.
Testcase 2: arr[]  = {2, 5} and sum = 10. There is no pair with sum 10., I have written this Solution Code: import numpy as np
from collections import defaultdict

t=int(input())
def solve():
  d=defaultdict(int)
  n,s=input().strip().split()
  s=int(s)
  a=np.array([input().strip().split()],int).flatten()
  for i in a:
    d[i]+=1
  c=0
  for i in a:
    if(d[s-i]>0 and (s-i)!=i):
      c=1
      break
  print(c)
while(t>0):
  solve()
  t-=1

, In this Programming Language: Python, Now tell me if this Code is compilable or not?