title: The fastest way to find union of sets
body: <p>I have sets of pairs of int like 
  <code>set&lt;pair&lt;int,int&gt; &gt; x1, x2, ... xn</code> ( n can be between 2 and 20). What is the fastest way to find union of those sets ?</p>
  
  <p>Sorry If I wasn't make clear at the beginning, I meant fast in performance, memory allocation is not a problem.</p>