This is a competitive programming problem and I wish to solve this using mathematics, if it is possible (I think it is). https://leetcode.com/problems/probability-of-a-two-boxes-having-the-same-number-of-distinct-balls/
Given $2n$ balls of $k$ distinct colors. You will be given an integer array balls of size $k$ where $\operatorname{balls}[i]$ is the number of balls of color $i$.
All the balls will be shuffled uniformly at random, then we will distribute the first n balls to the first box and the remaining n balls to the other box.
We want to calculate the probability that the two boxes have the same number of distinct balls.
I thought this has something to do with binomial distribution, but how can I approach this?