The conversation between human and AI assistant.
What is the use of C++ STL in competitive programming?
How about the set container? How is it commonly used in competitive programming?
The set container is used to store a sorted set of unique elements. It is commonly used for tasks that involve finding the smallest or largest element in a set, or checking for the presence of an element. For example, you can create a set of integers as follows:

set<int> nums;

And to insert an element into the set, you can use the insert() method:

nums.insert(10);

And to check if an element exists in the set, you can use the find() method:

if(nums.find(10) != nums.end()) {
        cout<<"10 found in the set"<<endl;
}