#include <iostream>
#include <set>

using std::set;
using std::cout;
using std::endl;

int main() {

  int A[4] = { 0, 1, 2, 3 };
  int B[6] = { 2, 3, 4, 5, 5, 6 };
  int C[5] = { 5, 6, 7, 8, 9 };

  set<int> AB;
  set<int> BC;
  set<int> CA;
  set<int> ABC;

  AB.insert( A, A + 4 );
  AB.insert( B, B + 6 );

  BC.insert( B, B + 6 );
  BC.insert( C, C+ 5 );

  CA.insert( C, C + 5 );
  CA.insert( A, A + 4 );

  ABC.insert( A, A + 4 );
  ABC.insert( B, B + 6 );
  ABC.insert( C, C + 5 );

  int maxSet = 0;
  size_t maxSize = AB.size();

  if ( BC.size() > maxSize ) {

    maxSize = BC.size();
    maxSet = 1;

  }

  if ( CA.size() > maxSize ) {

    maxSize = CA.size();
    maxSet = 2;

  }

  if ( ABC.size() > maxSize ) {

    maxSize = ABC.size();
    maxSet = 3;

  }

  cout << " Array Combination No. " << maxSet << " has MAX unique elements. " <<endl;
  cout << " The max number of unique elements = " << maxSize << endl;

  return 0;
}