$G(A, B)$ is a bipartite graph, where $|A|=|B|=n$. the edges in $G$ are colored RED and BLUE. How to tell if there is a perfect match, which has exactly $k$ RED edges and $(n-k)$ BLUE edges.(only need to give YES or NO)
The complexity must be polynomial, but it can be a RP or co-RP randomized algorithm.