Function to check if it is possible to generate all numbers in range [ 0 , N - 1 ] using the sum of elements in the multiset A and B mod N
bool isPossible ( multiset < int > A , multiset < int > B , set < int > C , int N ) {