{"id":326160,"date":"2021-07-08T15:00:42","date_gmt":"2021-07-08T15:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=326160"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=326160","title":{"rendered":"\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0430. \u041f\u043e\u0438\u0441\u043a \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ku\/3p\/nf\/ku3pnfznjbgxojwcgqvvmnrau-e.png\"><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: \u043f\u043e\u0438\u0441\u043a \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u0441\u0440\u0435\u0434\u0438 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443, \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0432\u043e\u0434\u043d\u044b\u0435, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043c \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h3>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h3>\n<p>\u041d\u0430 \u0432\u0445\u043e\u0434 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0442.\u0435. \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0438\u0441\u0435\u043b <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c5c\/fd9\/65d\/c5cfd965d20d08018eb431e71013f030.svg\" alt=\"N\"> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043d\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u0434\u0430\u043d \u043d\u0430\u043f\u0435\u0440\u0451\u0434 \u0438 \u0435\u0433\u043e \u0434\u043b\u0438\u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0442.\u0435. \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u044b\u043b\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4c2\/74f\/ac9\/4c274fac9a47d27a0fb180aed4491ca0.svg\" alt=\"O(Nlog(N)).\"><\/p>\n<h3>\u041c\u0435\u0434\u0438\u0430\u043d\u0430 \u0440\u044f\u0434\u0430 \u0447\u0438\u0441\u0435\u043b<\/h3>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u043e\u043d\u044f\u0442\u0438\u0439. \u041c\u0435\u0434\u0438\u0430\u043d\u043e\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e, \u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u044f\u0434\u0435 \u0447\u0438\u0441\u0435\u043b \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0440\u044f\u0434\u0443: 1, 2, 3, 7, 9 \u2014 \u0442\u0440\u043e\u0439\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u043e\u0439. \u0415\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0447\u0438\u0441\u0435\u043b \u0447\u0451\u0442\u043d\u043e\u0435, \u0442\u043e \u0437\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0447\u0438\u0441\u0435\u043b. <\/p>\n<p>\u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/943\/ef2\/dd3\/943ef2dd3decd91161d8ac8290783cc7.svg\" alt=\"k\/2\">, \u0435\u0441\u043b\u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/be9\/8d0\/5f9\/be98d05f964e79b653f568b8fceb6114.svg\" alt=\"k\"> \u0447\u0451\u0442\u043d\u043e\u0435 \u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b8\/799\/5d6\/9b87995d6626049cd089309e7dff1f7a.svg\" alt=\"(k+1)\/2,\"> \u0435\u0441\u043b\u0438 \u043d\u0435\u0447\u0435\u0442\u043d\u043e\u0435.<\/p>\n<h3>\u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434<\/h3>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0431\u0435\u0439\u0437\u043b\u0430\u0439\u043d\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u0435\u0434\u0438\u0430\u043d\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8cc\/c96\/e8e\/8ccc96e8e8b8cb83c20ece15b95c1738.svg\" alt=\"O(N^2)\">. <br \/>  \u041f\u0443\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u043c. \u0417\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0437 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0434\u0438\u0430\u043d.  <\/p>\n<pre><code class=\"python\">medians = [] items_read = [] with open('.\/Median.txt', 'r') as f:     for line in f:         num = int(line.strip())         for idx in range(len(items_read)):             if num &lt; items_read[idx]:                 items_read.insert(idx, num)                 break         if len(items_read) % 2 == 0:             median_pos = len(items_read) \/\/ 2         else:             median_pos = len(items_read) + 1 \/\/ 2         medians.append(median_pos) <\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c5c\/fd9\/65d\/c5cfd965d20d08018eb431e71013f030.svg\" alt=\"N\"> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0442\u043e\u043a\u0430, \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u043c\u0435\u0441\u0442\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432.<\/p>\n<p>  \u0423\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043a\u0443\u0447\u0430.<\/p>\n<h3>\u041a\u0443\u0447\u0430. Min-heap, max-heap<\/h3>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0443\u0447\u0443 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 min-heap. Min-heap \u2014 \u044d\u0442\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u0434\u0432\u0443\u043c\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438:   <\/p>\n<ol>\n<li>\u043a\u043b\u044e\u0447\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0435\u0433\u043e \u0434\u0432\u0443\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432,<\/li>\n<li>\u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u044b\u043c, \u0442.\u0435. \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0432\u0441\u0435 \u0443\u0440\u043e\u0432\u043d\u0438, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e.<\/li>\n<\/ol>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b8f\/8dd\/0df\/b8f8dd0dfe716be395500fd484e5bc5e.png\" alt=\"image\"> <br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0443\u0447\u0438 (<a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Min-heap.png\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>)<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f max-heap, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u00ab\u043c\u0435\u043d\u044c\u0448\u0435\u00bb \u043d\u0430 \u00ab\u0431\u043e\u043b\u044c\u0448\u0435\u00bb \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435.<br \/>  \u041f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u043a\u0443\u0447\u0438, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0437\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<h4>\u041f\u0435\u0440\u0432\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439: \u0432\u0437\u044f\u0442\u0438\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430 (\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430) \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435.<\/h4>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430\u044f \u0441 \u043a\u0443\u0447\u0435\u0439, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432\u0437\u044f\u0442\u0438\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u0430, \u0442\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0443\u0434\u0430. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043d\u0430 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <b>extract<\/b>, \u0447\u044c\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0436\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438 \u0440\u0430\u0432\u043d\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d67\/27b\/2d1\/d6727b2d1a2b28ac110657aec098cc65.svg\" alt=\"O(log(N))\">. <br \/>  \u041c\u0435\u0442\u043e\u0434 extract \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0434\u0435\u0440\u0435\u0432\u0430, \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u043a\u043e\u0440\u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <b>bubble_down<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430 \u0443\u0440\u043e\u0432\u043d\u0435\u043c (\u0430 \u0442\u0430\u043a\u0438\u0445 \u0432\u0441\u0435\u0433\u043e <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/497\/67e\/927\/49767e92712e37c7c859e34d765b5066.svg\" alt=\"log(N)\"> \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435) \u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0443\u0437\u0435\u043b.<br \/>  \u041a\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python \u0441\u043c\u043e\u0442\u0440\u0438 \u043d\u0438\u0436\u0435.<\/p>\n<h4>\u0412\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043a\u0443\u0447\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043d\u0435 \u0443\u0442\u0440\u0430\u0442\u0438\u0432 2 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0443\u0447\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u0430 \u0437\u0430\u0442\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <b>bubble_up<\/b> \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043a\u043e\u0440\u043d\u044f, \u043f\u043e\u043a\u0430 \u043d\u0430\u0434 \u043d\u0438\u043c \u043d\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043d\u0435\u0433\u043e \u0438\u043b\u0438 \u043e\u043d \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u043c. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0432\u043d\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d67\/27b\/2d1\/d6727b2d1a2b28ac110657aec098cc65.svg\" alt=\"O(log(N))\"><\/p>\n<p>  \u041a\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f min \u0438 max-heap:   <\/p>\n<pre><code class=\"python\">class Heap(object):     def __init__(self, array, type):         super(Heap, self).__init__()         self.type = type         self.data = []         self.heapify(array)          def heapify(self, array):         for item in array:             self.insert(item)      def bubble_down(self, array, index=0):         left = 2 * index + 1          right = 2 * index + 2         size = len(array)         least = index         if self.type == 'min':             if left &lt; size and array[left] &lt; array[least]:                 least = left             if right &lt; size and array[right] &lt; array[least]:                 least = right             if least != index:                 tmp_val = array[least]                 array[least] = array[index]                 array[index] = tmp_val                 self.bubble_down(array, index=least)         else:             if left &lt; size and array[left] &gt; array[least]:                 least = left             if  right &lt; size and array[right] &gt; array[least]:                 least = right             if least != index:                 tmp_val = array[least]                 array[least] = array[index]                 array[index] = tmp_val                 self.bubble_down(array, index=least)          def bubble_up(self, array, index):         parent = (index - 1) \/\/ 2         if self.type == 'min':             if array[index] &lt; array[parent] and parent &gt;= 0:                 tmp_val = array[parent]                 array[parent] = array[index]                 array[index] = tmp_val                 self.bubble_up(array, index=parent)         else:             if array[index] &gt; array[parent] and parent &gt;= 0:                 tmp_val = array[parent]                 array[parent] = array[index]                 array[index] = tmp_val                 self.bubble_up(array, index=parent)      def extract(self):         root = self.data.pop(0)         self.data.insert(0, self.data.pop(-1))         self.bubble_down(self.data, 0)         return root      def insert(self, element):         self.data.append(element)         self.bubble_up(self.data, index=len(self.data)-1)  if __name__ == &quot;__main__&quot;:     a = [3,99,4,88,0,5,1,2]     b = Heap(a, type='max')     print(b.data) <\/code><\/pre>\n<h3>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u044b, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u0443\u0447\u0438. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043a\u0443\u0447\u0438, \u043e\u0434\u043d\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e, \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e. \u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c: \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043f\u043e\u0442\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043d\u0438\u0436\u043d\u044e\u044e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u0435\u0440\u0432\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 min-heap, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435, \u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 max-heap.<br \/>  \u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0432 \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0438 \u0432 \u043d\u0438\u0436\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435. \u0417\u0430\u0442\u0435\u043c, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0432 \u0432\u0441\u0442\u0430\u0432\u043a\u0443, \u0431\u0443\u0434\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u043f\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0438\u0437 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u041a\u043e\u0434: <\/p>\n<pre><code class=\"python\">from heap import Heap   top_nums = Heap([], 'min') bot_nums = Heap([], 'max') medians = [] with open('.\/Median.txt', 'r') as f:     for line in f:         num = int(line.strip())         if len(top_nums.data):             top_smallest = top_nums.data[0]             if num &gt; top_smallest:                 top_nums.insert(num)             else:                 bot_nums.insert(num)         else:             bot_nums.insert(num)         while len(top_nums.data) &gt; len(bot_nums.data):             bot_nums.insert(top_nums.extract())         while len(top_nums.data) + 1 &lt; len(bot_nums.data):             top_nums.insert(bot_nums.extract())         medians.append(bot_nums.data[0]) <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0434\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d67\/27b\/2d1\/d6727b2d1a2b28ac110657aec098cc65.svg\" alt=\"O(log(N))\">, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043a\u0443\u0447\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u044d\u0442\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b38\/7ab\/dd7\/b387abdd78f0ec2b40cc9abd68d97678.svg\" alt=\"O(Nlog(N))\">.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043a\u0443\u0447\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c. \u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043f\u043e\u0442\u043e\u043a\u0435 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<blockquote><p>\u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0432\u0443\u0445\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432 \u043f\u043e \u0442\u0435\u043c\u0435: \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0436\u0430\u0442\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043a\u043e\u0434 \u0425\u0430\u0444\u0444\u043c\u0430\u043d\u0430.<\/p>\n<p>  <b><\/p>\n<ul>\n<li><a href=\"https:\/\/otus.pw\/ZuNO\/\">\u0417\u0410\u041f\u0418\u0421\u0410\u0422\u042c\u0421\u042f \u041d\u0410 \u0418\u041d\u0422\u0415\u041d\u0421\u0418\u0412. \u0414\u0415\u041d\u042c 1<\/a><\/li>\n<li><a href=\"https:\/\/otus.pw\/4nWp\/\">\u0417\u0410\u041f\u0418\u0421\u0410\u0422\u042c\u0421\u042f \u041d\u0410 \u0418\u041d\u0422\u0415\u041d\u0421\u0418\u0412. \u0414\u0415\u041d\u042c 2<\/a><\/li>\n<\/ul>\n<p><\/b><\/p><\/blockquote>\n<\/div>\n<p> \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\/company\/otus\/blog\/565988\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/565988\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ku\/3p\/nf\/ku3pnfznjbgxojwcgqvvmnrau-e.png\"><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443: \u043f\u043e\u0438\u0441\u043a \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u0441\u0440\u0435\u0434\u0438 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443, \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0432\u043e\u0434\u043d\u044b\u0435, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043c \u0438 \u043e\u0446\u0435\u043d\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\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-326160","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326160","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=326160"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/326160\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}