how to insert a struct into a set based on first element of the struct?
You can use set< pair<int,int> > if you want to store pair<int,int> in the set.
how to insert a struct into a set based on first element of the struct?
You can use set< pair<int,int> > if you want to store pair<int,int> in the set.