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