#include #include #include using namespace std; int main() { map m = {{"z", 2},{"y", 1},{"x", 3}}; map :: iterator i; cout<first<< ","<< i->second<<"} ";// {a,4} {b,5} {x,3} {y,1} {z,2} cout << endl; i=m.begin(); advance(i,2); m.erase(i); for (i= m.begin(); i != m.end(); i++) cout <<"{"<first<< ","<< i->second<<"} ";// {a,4} {b,5} {y,1} {z,2} cout << endl; cout << m.count("b") << m.count("c") << endl;// 10 cout << m.find("b") ->second << endl; // 5 - значення для ключа "b" i=m.find("c"); advance(i,-2); cout << i ->second << endl; // 1 - значення для ключа "y" - другого з кінця return 0; }