{"id":368047,"date":"2024-05-21T03:34:20","date_gmt":"2024-05-21T03:34:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=368047"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=368047","title":{"rendered":"<span>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 STL \u0432 C++<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/em><\/p>\n<p><strong>STL<\/strong> \u2014 \u044d\u0442\u043e <strong>\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f<\/strong> <strong>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/strong>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f: <em>\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b<\/em>, <em>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/em>, <em>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/em> \u0438 <em>\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435<\/em> <em>\u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/em>, STL \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u0439 \u043d\u043e\u0436\u0438\u043a \u0432 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0435. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0431\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043b\u0443\u0436\u0430\u0442 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u043c \u0437\u0432\u0435\u043d\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0433\u0438\u0431\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p><em>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/em> <\/p>\n<h2>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b STL  <\/h2>\n<h4>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b  <\/h4>\n<p><code>std::vector<\/code> \u2014 \u044d\u0442\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432 C++:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;vector>  int main() {     std::vector&lt;int> numbers = {1, 2, 3, 4, 5};     numbers.push_back(6); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"Third element: \" &lt;&lt; numbers[2] &lt;&lt; std::endl;      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e vector     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::list<\/code> \u2014 \u044d\u0442\u043e \u0434\u0432\u0443\u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <code>vector<\/code>, <code>list<\/code> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u0447\u0435:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;list>  int main() {     std::list&lt;int> numbers = {1, 2, 3, 4, 5};     numbers.push_front(0); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430      \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     numbers.remove(3);      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e list     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::deque<\/code> (double-ended queue) \u2014 \u044d\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0441 \u043d\u0430\u0447\u0430\u043b\u0430, \u0442\u0430\u043a \u0438 \u0441 \u043a\u043e\u043d\u0446\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. <code>deque<\/code> \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043a\u0430\u0447\u0435\u0441\u0442\u0432 <code>vector<\/code> \u0438 <code>list<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;deque>  int main() {     std::deque&lt;int> numbers = {2, 3, 4};     numbers.push_front(1); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e     numbers.push_back(5);  \/\/ \u0434\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"First element: \" &lt;&lt; numbers.front() &lt;&lt; std::endl;     std::cout &lt;&lt; \"Last element: \" &lt;&lt; numbers.back() &lt;&lt; std::endl;      \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     numbers.pop_front();      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e deque     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<h4>\u0410\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b  <\/h4>\n<p><code>std::set<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u041f\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447, \u0433\u0434\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f\u0441\u044c \u043e \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u0430\u0445:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;set>  int main() {     std::set&lt;int> numbers = {4, 2, 1, 3, 5};     numbers.insert(6); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442      numbers.insert(3); \/\/ \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442 \u0431\u0435\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0442.\u0435      \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     if (numbers.find(4) != numbers.end()) {         std::cout &lt;&lt; \"4 is in the set\" &lt;&lt; std::endl;     }      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e set     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \"; \/\/ \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::multiset<\/code> \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 <code>set<\/code>, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;set>  int main() {     std::multiset&lt;int> numbers = {5, 2, 1, 3, 2};     numbers.insert(2); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442      \/\/ \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e multiset     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \"; \/\/ \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::map<\/code> \u2014 \u044d\u0442\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432 <code>map<\/code> \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d, \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0444\u0430\u0441\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;map>  int main() {     std::map&lt;std::string, int> fruitCount = {{\"apple\", 2}, {\"banana\", 5}};     fruitCount[\"orange\"] = 4; \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"Apples: \" &lt;&lt; fruitCount[\"apple\"] &lt;&lt; std::endl;      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e map     for(const auto&amp; pair : fruitCount) {         std::cout &lt;&lt; pair.first &lt;&lt; \": \" &lt;&lt; pair.second &lt;&lt; std::endl;     }      return 0; }<\/code><\/pre>\n<p><code>std::multimap<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <code>map<\/code>, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;map>  int main() {     std::multimap&lt;std::string, int> fruitCount = {{\"apple\", 2}, {\"apple\", 3}, {\"banana\", 5}};     fruitCount.insert({\"apple\", 1}); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 \"apple\"      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e multimap     auto range = fruitCount.equal_range(\"apple\");     for(auto it = range.first; it != range.second; ++it) {         std::cout &lt;&lt; it->first &lt;&lt; \": \" &lt;&lt; it->second &lt;&lt; std::endl;     }      return 0; }<\/code><\/pre>\n<h4>\u041d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b  <\/h4>\n<p><code>std::unordered_set<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041e\u043d \u0434\u0430\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;unordered_set>  int main() {     std::unordered_set&lt;int> numbers = {4, 1, 2, 3, 5};     numbers.insert(6); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442     numbers.erase(1); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442      \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     if (numbers.find(4) != numbers.end()) {         std::cout &lt;&lt; \"4 is in the set\" &lt;&lt; std::endl;     }      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e unordered_set     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::unordered_map<\/code> \u2014 \u044d\u0442\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;unordered_map>  int main() {     std::unordered_map&lt;std::string, int> fruitCount = {{\"apple\", 2}, {\"banana\", 5}};     fruitCount[\"orange\"] = 4; \/\/ \u0434\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     fruitCount.erase(\"banana\");      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"Apples: \" &lt;&lt; fruitCount[\"apple\"] &lt;&lt; std::endl;      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e unordered_map     for(const auto&amp; pair : fruitCount) {         std::cout &lt;&lt; pair.first &lt;&lt; \": \" &lt;&lt; pair.second &lt;&lt; std::endl;     }      return 0; }<\/code><\/pre>\n<h4>\u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432   <\/h4>\n<p><code>std::stack<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0435\u043a\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f <abbr class=\"habraabbr\" title=\"LIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u0412 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 LIFO, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u00ab\u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0430\u00bb.\" data-title=\"&lt;p>LIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u0412 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 LIFO, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u00ab\u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0430\u00bb.  &lt;\/p>&#187; data-abbr=&#187;LIFO &#171;>LIFO <\/abbr>. \u0422\u043e \u0431\u0438\u0448\u044c \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;stack>  int main() {     std::stack&lt;int> numbers;     numbers.push(1); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     numbers.push(2);     numbers.push(3);      \/\/ \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     while (!numbers.empty()) {         std::cout &lt;&lt; numbers.top() &lt;&lt; \" \"; \/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442         numbers.pop(); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::queue<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0441\u043b\u0435\u0434\u0443\u044f <abbr class=\"habraabbr\" title=\"FIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0443\u0442\u0451\u043c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: \u00ab\u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u2014 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0435\u043d\u00bb\" data-title=\"&lt;p>FIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0443\u0442\u0451\u043c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: \u00ab\u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u2014 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0435\u043d\u00bb  &lt;\/p>&#187; data-abbr=&#187;FIFO&#187;>FIFO<\/abbr>:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;queue>  int main() {     std::queue&lt;int> numbers;     numbers.push(1); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     numbers.push(2);     numbers.push(3);      \/\/ \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     while (!numbers.empty()) {         std::cout &lt;&lt; numbers.front() &lt;&lt; \" \"; \/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442         numbers.pop(); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::priority_queue<\/code> \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0430\u043a, \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 (\u0438\u043b\u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0439) \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u0435:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;queue>  int main() {     std::priority_queue&lt;int> numbers;     numbers.push(3);     numbers.push(1);     numbers.push(4);     numbers.push(2);      \/\/ \u0438\u0437\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     while (!numbers.empty()) {         std::cout &lt;&lt; numbers.top() &lt;&lt; \" \"; \/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043d\u0430\u0438\u0432\u044b\u0441\u0448\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c         numbers.pop(); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043d\u0430\u0438\u0432\u044b\u0441\u0448\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<h2>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b STL  <\/h2>\n<h4>\u041f\u043e\u0438\u0441\u043a<\/h4>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 STL \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u2014 <code>std::find<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     auto it = std::find(data.begin(), data.end(), 3);     if (it != data.end()) {         std::cout &lt;&lt; \"Found: \" &lt;&lt; *it &lt;&lt; std::endl;     } else {         std::cout &lt;&lt; \"Not found\" &lt;&lt; std::endl;     }     return 0; }<\/code><\/pre>\n<h4>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/h4>\n<p>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u2014 \u0442\u043e\u0436\u0435 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. STL \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 <code>std::sort<\/code> \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {5, 1, 4, 2, 3};     std::sort(data.begin(), data.end());     for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u041f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 STL \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 <code>std::rotate<\/code> \u0438 <code>std::next_permutation<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     std::rotate(data.begin(), data.begin() + 2, data.end());     for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p><code>std::copy<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream> #include &lt;iterator>  int main() {     std::vector&lt;int> src = {1, 2, 3, 4, 5};     std::vector&lt;int> dest(5);     std::copy(src.begin(), src.end(), dest.begin());     for (int n : dest) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0415\u0441\u0442\u044c \u0442\u0430\u043a \u0436\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0434\u043b\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>std::transform<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     std::transform(data.begin(), data.end(), data.begin(),                    [](int x) { return x * x; });     for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p><code>std::remove<\/code> \u0438 <code>std::remove_if<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5, 6};     auto newEnd = std::remove_if(data.begin(), data.end(),                                  [](int x) { return x % 2 == 0; });     data.erase(newEnd, data.end());     for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432, \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u0430\u043c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u044b:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;iostream> #include &lt;vector> #include &lt;string>  struct Employee {     std::string name;     std::string department;     int salary;      \/\/ \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430     Employee(std::string n, std::string d, int s) : name(n), department(d), salary(s) {} };  \/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 void printEmployees(const std::vector&lt;Employee>&amp; employees) {     for (const auto&amp; e : employees) {         std::cout &lt;&lt; e.name &lt;&lt; \" from \" &lt;&lt; e.department &lt;&lt; \", Salary: \" &lt;&lt; e.salary &lt;&lt; std::endl;     } }  int main() {     std::vector&lt;Employee> employees = {         {\"Alice\", \"Accounting\", 50000},         {\"Bob\", \"HR\", 45000},         {\"Charlie\", \"IT\", 70000},         {\"Diana\", \"Accounting\", 55000},         {\"Eve\", \"HR\", 48000},         {\"Frank\", \"IT\", 52000}     };      \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u0430\u043c     std::stable_sort(employees.begin(), employees.end(),                      [](const Employee&amp; a, const Employee&amp; b) {                          return a.department &lt; b.department;                      });      \/\/ \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u044b     std::stable_sort(employees.begin(), employees.end(),                      [](const Employee&amp; a, const Employee&amp; b) {                          return a.salary > b.salary;                      });      printEmployees(employees);      return 0; }<\/code><\/pre>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 4, 2, 3, 2, 3, 4, 5, 5, 6};      \/\/ \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435     std::sort(data.begin(), data.end());      \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b     auto last = std::unique(data.begin(), data.end());     data.erase(last, data.end());      for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0443\u043c\u043d\u043e\u0436\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 2 \u0438 \u0432\u044b\u0447\u0442\u044f 1. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>std::transform<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     std::vector&lt;int> transformedData(data.size());      std::transform(data.begin(), data.end(), transformedData.begin(),                    [](int x) { return x * 2 - 1; });      for (int n : transformedData) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b STL<\/h2>\n<p><strong>Input \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/strong> \u2014 \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041c\u043e\u0436\u043d\u043e \u044e\u0437\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;vector> #include &lt;iterator>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     std::istream_iterator&lt;int> start(std::cin), end; \/\/ \u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430     std::vector&lt;int> numbers(start, end); \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438      for (int n : numbers) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><strong>Output \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/strong> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u043f\u0440\u043e\u0445\u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;iterator> #include &lt;algorithm>  int main() {     std::ostream_iterator&lt;int> out_it (std::cout,\", \");     std::vector&lt;int> data = {1, 2, 3, 4, 5};      std::copy(data.begin(), data.end(), out_it); \/\/ \u0432\u044b\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434     return 0; } <\/code><\/pre>\n<p><strong>Forward \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/strong> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c:<\/p>\n<pre><code class=\"cpp\">#include &lt;forward_list> #include &lt;iostream>  int main() {     std::forward_list&lt;int> flist = {1, 2, 3, 4, 5};      for (auto it = flist.begin(); it != flist.end(); ++it) {         std::cout &lt;&lt; *it &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><strong>Bidirectional \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/strong> \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 forward \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 (\u0432\u043f\u0435\u0440\u0435\u0434 \u0438 \u043d\u0430\u0437\u0430\u0434):<\/p>\n<pre><code class=\"cpp\">#include &lt;list> #include &lt;iostream>  int main() {     std::list&lt;int> l = {1, 2, 3, 4, 5};      for (auto it = l.rbegin(); it != l.rend(); ++it) { \/\/ \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u0431\u0445\u043e\u0434         std::cout &lt;&lt; *it &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p>Random access \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 bidirectional \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f:<\/p>\n<pre><code class=\"cpp\">#include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> v = {1, 2, 3, 4, 5};      std::cout &lt;&lt; \"Third element: \" &lt;&lt; v[2] &lt;&lt; std::endl; \/\/ \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f     std::cout &lt;&lt; \"Second element using iterator: \" &lt;&lt; *(v.begin() + 1) &lt;&lt; std::endl; \/\/ \u0414\u043e\u0441\u0442\u0443\u043f \u0447\u0435\u0440\u0435\u0437 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440      return 0; }<\/code><\/pre>\n<hr\/>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u0451\u043c \u043a\u0440\u0430\u0442\u043a\u043e \u0438\u0442\u043e\u0433\u0438: STL \u0432 C++ \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430. <\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u0435\u043c, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e \u043f\u0440\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0432\u0435\u0431\u0438\u043d\u0430\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u0443\u0440\u0441\u0430 OTUS \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 C++. \u041d\u0430 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0443\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 C++20. <a href=\"https:\/\/otus.pw\/uIAy\/\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c<\/a>, \u0435\u0441\u043b\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0421 \u043f\u043e\u043b\u043d\u044b\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c \u043a\u0443\u0440\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/otus.pw\/4LOG\/\">\u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. <\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/793278\/\"> https:\/\/habr.com\/ru\/articles\/793278\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/em><\/p>\n<p><strong>STL<\/strong> \u2014 \u044d\u0442\u043e <strong>\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f<\/strong> <strong>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/strong>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f: <em>\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b<\/em>, <em>\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/em>, <em>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/em> \u0438 <em>\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435<\/em> <em>\u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/em>, STL \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u0439 \u043d\u043e\u0436\u0438\u043a \u0432 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0435. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0431\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043b\u0443\u0436\u0430\u0442 \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u043c \u0437\u0432\u0435\u043d\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0433\u0438\u0431\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p><em>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/em> <\/p>\n<h2>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b STL  <\/h2>\n<h4>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b  <\/h4>\n<p><code>std::vector<\/code> \u2014 \u044d\u0442\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432 C++:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;vector>  int main() {     std::vector&lt;int> numbers = {1, 2, 3, 4, 5};     numbers.push_back(6); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"Third element: \" &lt;&lt; numbers[2] &lt;&lt; std::endl;      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e vector     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::list<\/code> \u2014 \u044d\u0442\u043e \u0434\u0432\u0443\u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <code>vector<\/code>, <code>list<\/code> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u043d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u0447\u0435:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;list>  int main() {     std::list&lt;int> numbers = {1, 2, 3, 4, 5};     numbers.push_front(0); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430      \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     numbers.remove(3);      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e list     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::deque<\/code> (double-ended queue) \u2014 \u044d\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0441 \u043d\u0430\u0447\u0430\u043b\u0430, \u0442\u0430\u043a \u0438 \u0441 \u043a\u043e\u043d\u0446\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. <code>deque<\/code> \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043a\u0430\u0447\u0435\u0441\u0442\u0432 <code>vector<\/code> \u0438 <code>list<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;deque>  int main() {     std::deque&lt;int> numbers = {2, 3, 4};     numbers.push_front(1); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e     numbers.push_back(5);  \/\/ \u0434\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"First element: \" &lt;&lt; numbers.front() &lt;&lt; std::endl;     std::cout &lt;&lt; \"Last element: \" &lt;&lt; numbers.back() &lt;&lt; std::endl;      \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     numbers.pop_front();      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e deque     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<h4>\u0410\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b  <\/h4>\n<p><code>std::set<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u041f\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447, \u0433\u0434\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f\u0441\u044c \u043e \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u0430\u0445:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;set>  int main() {     std::set&lt;int> numbers = {4, 2, 1, 3, 5};     numbers.insert(6); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442      numbers.insert(3); \/\/ \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442 \u0431\u0435\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0442.\u0435      \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     if (numbers.find(4) != numbers.end()) {         std::cout &lt;&lt; \"4 is in the set\" &lt;&lt; std::endl;     }      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e set     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \"; \/\/ \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::multiset<\/code> \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 <code>set<\/code>, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;set>  int main() {     std::multiset&lt;int> numbers = {5, 2, 1, 3, 2};     numbers.insert(2); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442      \/\/ \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e multiset     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \"; \/\/ \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::map<\/code> \u2014 \u044d\u0442\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432 <code>map<\/code> \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d, \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0444\u0430\u0441\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;map>  int main() {     std::map&lt;std::string, int> fruitCount = {{\"apple\", 2}, {\"banana\", 5}};     fruitCount[\"orange\"] = 4; \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"Apples: \" &lt;&lt; fruitCount[\"apple\"] &lt;&lt; std::endl;      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e map     for(const auto&amp; pair : fruitCount) {         std::cout &lt;&lt; pair.first &lt;&lt; \": \" &lt;&lt; pair.second &lt;&lt; std::endl;     }      return 0; }<\/code><\/pre>\n<p><code>std::multimap<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e <code>map<\/code>, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;map>  int main() {     std::multimap&lt;std::string, int> fruitCount = {{\"apple\", 2}, {\"apple\", 3}, {\"banana\", 5}};     fruitCount.insert({\"apple\", 1}); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 \"apple\"      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e multimap     auto range = fruitCount.equal_range(\"apple\");     for(auto it = range.first; it != range.second; ++it) {         std::cout &lt;&lt; it->first &lt;&lt; \": \" &lt;&lt; it->second &lt;&lt; std::endl;     }      return 0; }<\/code><\/pre>\n<h4>\u041d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b  <\/h4>\n<p><code>std::unordered_set<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041e\u043d \u0434\u0430\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;unordered_set>  int main() {     std::unordered_set&lt;int> numbers = {4, 1, 2, 3, 5};     numbers.insert(6); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442     numbers.erase(1); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442      \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     if (numbers.find(4) != numbers.end()) {         std::cout &lt;&lt; \"4 is in the set\" &lt;&lt; std::endl;     }      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e unordered_set     for(int num : numbers) {         std::cout &lt;&lt; num &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::unordered_map<\/code> \u2014 \u044d\u0442\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;unordered_map>  int main() {     std::unordered_map&lt;std::string, int> fruitCount = {{\"apple\", 2}, {\"banana\", 5}};     fruitCount[\"orange\"] = 4; \/\/ \u0434\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u0440\u0443 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      \/\/ \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430     fruitCount.erase(\"banana\");      \/\/ \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c     std::cout &lt;&lt; \"Apples: \" &lt;&lt; fruitCount[\"apple\"] &lt;&lt; std::endl;      \/\/ \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e unordered_map     for(const auto&amp; pair : fruitCount) {         std::cout &lt;&lt; pair.first &lt;&lt; \": \" &lt;&lt; pair.second &lt;&lt; std::endl;     }      return 0; }<\/code><\/pre>\n<h4>\u0410\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432   <\/h4>\n<p><code>std::stack<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0435\u043a\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f <abbr class=\"habraabbr\" title=\"LIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u0412 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 LIFO, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u00ab\u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0430\u00bb.\" data-title=\"&lt;p>\u043d\u0446\u0438\u043f\u0443 LIFO, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u00ab\u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0430\u00bb.&#187; data-title=&lt;p>LIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u0412 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435, \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 LIFO, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u00ab\u0432\u0435\u0440\u0448\u0438\u043d\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0430\u00bb.  &lt;\/p>&#187; data-abbr=&#187;LIFO &#171;>LIFO <\/abbr>. \u0422\u043e \u0431\u0438\u0448\u044c \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;stack>  int main() {     std::stack&lt;int> numbers;     numbers.push(1); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     numbers.push(2);     numbers.push(3);      \/\/ \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     while (!numbers.empty()) {         std::cout &lt;&lt; numbers.top() &lt;&lt; \" \"; \/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442         numbers.pop(); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::queue<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0441\u043b\u0435\u0434\u0443\u044f <abbr class=\"habraabbr\" title=\"FIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0443\u0442\u0451\u043c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: \u00ab\u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u2014 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0435\u043d\u00bb\" data-title=\"&lt;p> \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0443\u0442\u0451\u043c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: \u00ab\u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u2014 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0435\u043d\u00bb&#187; data-title=&#187;&lt;p>FIFO \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0443\u0442\u0451\u043c \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: \u00ab\u043f\u0435\u0440\u0432\u044b\u043c \u043f\u0440\u0438\u0448\u0451\u043b \u2014 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0435\u043d\u00bb  &lt;\/p>&#187; data-abbr=&#187;FIFO&#187;>FIFO<\/abbr>:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;queue>  int main() {     std::queue&lt;int> numbers;     numbers.push(1); \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     numbers.push(2);     numbers.push(3);      \/\/ \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     while (!numbers.empty()) {         std::cout &lt;&lt; numbers.front() &lt;&lt; \" \"; \/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442         numbers.pop(); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<p><code>std::priority_queue<\/code> \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0430\u043a, \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 (\u0438\u043b\u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0439) \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0435\u0440\u0448\u0438\u043d\u0435:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include &lt;queue>  int main() {     std::priority_queue&lt;int> numbers;     numbers.push(3);     numbers.push(1);     numbers.push(4);     numbers.push(2);      \/\/ \u0438\u0437\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b     while (!numbers.empty()) {         std::cout &lt;&lt; numbers.top() &lt;&lt; \" \"; \/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043d\u0430\u0438\u0432\u044b\u0441\u0448\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c         numbers.pop(); \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043d\u0430\u0438\u0432\u044b\u0441\u0448\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c     }     std::cout &lt;&lt; std::endl;      return 0; }<\/code><\/pre>\n<h2>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b STL  <\/h2>\n<h4>\u041f\u043e\u0438\u0441\u043a<\/h4>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 STL \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u2014 <code>std::find<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     auto it = std::find(data.begin(), data.end(), 3);     if (it != data.end()) {         std::cout &lt;&lt; \"Found: \" &lt;&lt; *it &lt;&lt; std::endl;     } else {         std::cout &lt;&lt; \"Not found\" &lt;&lt; std::endl;     }     return 0; }<\/code><\/pre>\n<h4>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/h4>\n<p>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u2014 \u0442\u043e\u0436\u0435 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. STL \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 <code>std::sort<\/code> \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {5, 1, 4, 2, 3};     std::sort(data.begin(), data.end());     for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u041f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 STL \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 <code>std::rotate<\/code> \u0438 <code>std::next_permutation<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream>  int main() {     std::vector&lt;int> data = {1, 2, 3, 4, 5};     std::rotate(data.begin(), data.begin() + 2, data.end());     for (int n : data) {         std::cout &lt;&lt; n &lt;&lt; \" \";     }     std::cout &lt;&lt; std::endl;     return 0; }<\/code><\/pre>\n<h4>\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p><code>std::copy<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">#include &lt;algorithm> #include &lt;vector> #include &lt;iostream> #include &lt;iterator>  int main() {     std::vector&lt;int> src = {1, 2, 3, 4, 5};     std::vector&lt;int><\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-368047","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/368047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=368047"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/368047\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=368047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=368047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=368047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}