title: What is .second used for?
body: <p>What does if(s.insert(A[i]).second) mean? s is a set and A is a vector. The code is as such-</p>
  
  <pre><code>int main() {
  long long p,i,input;
  vector&lt;long long&gt; A;
  cin&gt;&gt;p;
  for(i=0;i&lt;p;i++)
  {
          cin&gt;&gt;input;
          A.push_back(input);
  }
  long long N = A.size();
  set&lt;long long&gt; s;
  set&lt;long long&gt;::iterator k;
  for (i=0;i&lt;N;i++)
  {
      if (s.insert(A[i]).second)
      {
         k = s.find(A[i]);
         k++;
         if (k!=s.end())
            s.erase(k);
      }
  }
  
  cout&lt;&lt;s.size();
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks in advance!</p>