//在map中插入map的值:
#include <map>
#include <iostream>
int main() {
std::map<int, int>a,b,c;
a.insert({ 1,1 });
a.insert({ 2,2 });
//复制第一组
b.insert({ a.begin()->first,a.begin()->second});
std::cout<<b.begin()->first<<" "<< b.begin()->second;
//复制最后一组
std::map<int, int>::iterator it = a.end();
it--;
c.insert({ it->first,it->second });
std::cout << c.begin()->first << " " << c.begin()->second;
std::cout << "hello";
return 0;
}