STL Quiz set doubt

Q13. stl set iterator returned by insert
What will be the output of following C++ code?

#include <bits/stdc++.h>
using namespace std;
int main()
{
    set<int>s;
    pair<set<int>::iterator, bool> ret;
    s.insert(1);
    s.insert(5);
    s.insert(10);
    s.insert(3);
    ret = s.insert(10);
    cout<<ret.second<<endl;
    return 0;
}

0

Compilation Error

Runtime Error

1

My answer is 1

http://www.cplusplus.com/reference/set/set/insert/

the parameters determine how many elements are inserted and to which values they are initialized

since 10 is already present in the set
hence second time u try to insert 10
it returns 0 ( since no element is added) and the setLL iterator returns the iterator pointing to the 10 that is already present in the container

I thought that set store unique elements so 10 is already present and it’s second value is true(1) so it should return 1.

bool basically is telling whether the value is getting inserted or not !

so since the value is not getting inserted hence bool == 0