#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
typedef std::pair<int, int> p_int;
int main()
{
std::vector<p_int> v;
v.push_back(std::make_pair(3, 2));
v.push_back(std::make_pair(2, 3));
v.push_back(std::make_pair(1, 4));
v.push_back(std::make_pair(1, 3));
std::sort(v.begin(), v.end());
for (auto &x : v)
std::cout << x.first << x.second;
}
Login in to like
Login in to comment