------
## 最终结论
```python
def smallest_distance_pair(nums, k):
    def generate_pairs_distances(nums):
        distances = []
        n = len(nums)
        for i in range(n):
            for j in range(i + 1, n):
                distance = abs(nums[i] - nums[j])
                distances.append(distance)
        return distances

    def kth_smallest_distance(distances, k):
        sorted_distances = sorted(distances)
        return sorted_distances[k - 1]

    distances = generate_pairs_distances(nums)
    return kth_smallest_distance(distances, k)

# Example usage:
nums = [1, 3, 1]
k = 1
result = smallest_distance_pair(nums, k)
print(result)  # Output: 0
```