#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<unordered_map>
using namespace std;
int main()
{
vector<int> res;
res.push_back(1);
res.push_back(2);
res.push_back(3);
vector<int>::iterator it = find(res.begin(), res.end(),3);
res.erase(it);
set<int> s;
s.insert(1);
s.insert(2);
set<int>::iterator itt = s.find(2);
s.erase(itt);
map<char, int> cnt;
cnt['a'] = 1;
map<char, int>::iterator ittt = cnt.find('a');
cnt.erase(ittt);
cnt.insert(make_pair('c', 2));
return 0;
}
#include<iostream>
#include<queue>
#include<algorithm>
using namespace std;
struct cmp{
bool operator()(int a, int b)
{
return a < b;
}
};
struct pp{
int a, b;
bool operator <(pp tem)
{
return a < tem.a;
}
};
struct node{
int x, y;
friend bool operator < (node a, node b)
{
return a.x > b.x;
}
};
int main()
{
priority_queue<int, vector<int>, greater<int>> q;
q.push(1);
q.push(4);
q.push(9);
priority_queue<int, vector<int>, cmp> p;
p.push(1);
p.push(3);
p.push(2);
priority_queue<node> s;
s.push({2,4});
s.push({3,5});
pp arr[3];
arr[0] = {1, 2};
arr[1] = {2, 3};
sort(arr, arr + 2);
cout << arr[0].a << endl;
return 0;
}