Function to find number of pairs
static bool check ( int x , List < int > pos , List < int > neg , int k ) { int pairs = 0 ; int p = neg . Count - 1 ; int nn = neg . Count - 1 ; int pp = pos . Count - 1 ;