#: Count Distinct Slices solution