Function to return the count of numbers that when added with n give a perfect square
int countPairsWith ( int n , vector < int > & perfectSquares , unordered_set < int > & nums ) { int count = 0 ; for ( int i = 0 ; i < perfectSquares . size ( ) ; i ++ ) { int temp = perfectSquares [ i ] - n ;