title: c++ STL sort by a vector of int and string
body: <p>Today I was solving a problem on topcoder in which I have to sort countries by medals in Olympics.  I have an STL container <code>vector&lt;pair&lt;vector&lt;int&gt;, string&gt; &gt; v;</code> The <code>vector&lt;int&gt;</code> contains no of gold, silver and bronze won by a country. I have to sort the structure in this particular order gold, silver, bronze and country(alphabetic order).</p>
  
  <p>I used sort(v.begin(), v.end()) but this sorting only by the first value in the pair ie by gold, silver and bronze and its not ordering countries by alphabetic order when g,s,b medals of two countries are same. </p>