count distinct pairs with difference k leetcode