#include "combinations.h"
#include <set>
#include <list>

int main()
{

  set<int> the_elements;

  the_elements.insert(3);
  the_elements.insert(9);
  the_elements.insert(7);
  the_elements.insert(0);

  set< set<int> > set_of_combinations = compute_combinations(the_elements);

  set< set<int> >::const_iterator a_combination = set_of_combinations.begin();
  while (a_combination != set_of_combinations.end())
  {
    set<int>::const_iterator a_selected_element = (*a_combination).begin();
    while (a_selected_element != (*a_combination).end())
    {
      cout << *a_selected_element << " ";
      a_selected_element++;
    }

    cout << endl;
    a_combination++;
  }

  cout << set_of_combinations.size() << " total combinations" << endl;

  return 0;
}
