title: Efficient way to remove duplicates in a multimap?
body: <p>What is the best way to remove duplicates in a large multimap in C++? For instance, I have a multimap, key &lt;1,4> with its value 9 appears twice, how to get rid of it quickly? Thanks</p>
  
  <pre><code>...
  &lt;1,2&gt; --&gt; 3
  &lt;1,3&gt; --&gt; 7
  &lt;1,4&gt; --&gt; 9
  &lt;1,4&gt; --&gt; 9
  ...
  </code></pre>
  
  <p>I want it to to be </p>
  
  <pre><code>...
  &lt;1,2&gt; --&gt; 3
  &lt;1,3&gt; --&gt; 7
  &lt;1,4&gt; --&gt; 9
  ...
  </code></pre>