{"id":457397,"date":"2025-04-25T15:04:31","date_gmt":"2025-04-25T15:04:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457397"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457397","title":{"rendered":"<span>\u041a\u0440\u043e\u043b\u0438\u043a\u0438 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430<\/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>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u043b\u0430 <a href=\"https:\/\/habr.com\/ru\/articles\/901190\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438 \u043d\u0443\u043b\u0435\u0439. \u0410\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u0435\u0451 \u0440\u0435\u0448\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b.<\/p>\n<p>\u042f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0434\u0443\u043c\u044b\u0432\u0430\u043b \u0435\u0451, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0435\u0437 \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. \u0422\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (DP). \u041d\u043e \u043c\u0435\u043d\u044f \u0432\u0441\u0451 \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0441\u0435 \u043f\u043e\u043b\u044f (\u0442\u043e\u0447\u043d\u0435\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e N*M \u0438 \u043f\u0440\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435 &#171;\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0435\u0434\u0438\u043d\u0438\u0446 * 4&#187;).<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d54\/eb0\/2f6\/d54eb02f6df6f96a694c760cc7302c2f.png\" width=\"221\" height=\"210\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d54\/eb0\/2f6\/d54eb02f6df6f96a694c760cc7302c2f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d54\/eb0\/2f6\/d54eb02f6df6f96a694c760cc7302c2f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0411\u0435\u0436\u0438\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e (\u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c), \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446, \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e, \u0432 \u043c\u0435\u0441\u0442\u0430\u0445 \u0441\u043a\u043b\u0435\u0435\u043a \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b. \u041d\u043e \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u043e \u043f\u043e\u0438\u0441\u043a, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445 \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430 N*M.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0438 \u043c\u044b\u0441\u043b\u0438 \u043d\u0430\u0432\u0435\u043b\u0438 \u043c\u0435\u043d\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438, \u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0441\u043f\u0438\u0441\u043a\u0438 \u0438\u0437 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430 \u0438 \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u043e\u043b\u044c, \u0442\u043e \u043e\u043d \u0443\u0434\u0430\u043b\u0438\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u044d\u0442\u0443 \u044f\u0447\u0435\u0439\u043a\u0443. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0443\u0447\u0438, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u0431\u044b \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0438\u0436\u0435, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442 9\u04459 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0438 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0443\u0433\u043b\u043e\u0432 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0443\u043b\u0438. \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0430\u044f \u0437\u043e\u043d\u0430 \u0441\u0443\u0436\u0430\u0435\u0442\u0441\u044f (\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043b\u0435\u0432\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u0441\u043d\u0438\u0437\u0443 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435)<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/123\/d2b\/548\/123d2b548fa2b60229661d1dad2a02a2.png\" width=\"221\" height=\"203\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/123\/d2b\/548\/123d2b548fa2b60229661d1dad2a02a2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/123\/d2b\/548\/123d2b548fa2b60229661d1dad2a02a2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0437\u043e\u043d\u0435 (2, 1), (9,8)<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60d\/d59\/53f\/60dd5953f21d8adcc34621597d8cdc5b.png\" width=\"221\" height=\"204\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/60d\/d59\/53f\/60dd5953f21d8adcc34621597d8cdc5b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60d\/d59\/53f\/60dd5953f21d8adcc34621597d8cdc5b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0438 (1,2), (8, 9)<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a2a\/4e0\/596\/a2a4e0596fda77c5b88a4eeb507ef89e.png\" width=\"221\" height=\"204\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a2a\/4e0\/596\/a2a4e0596fda77c5b88a4eeb507ef89e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a2a\/4e0\/596\/a2a4e0596fda77c5b88a4eeb507ef89e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0434\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e \u0438 \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438 \u043f\u0440\u0430\u0432\u044b\u0439 \u043d\u0438\u0436\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0430 (2, 1) \u0435\u0434\u0438\u043d\u0438\u0446\u0430, \u0430 \u0432\u043e\u0442 \u043d\u0430 (9, 8) \u0443\u0436\u0435 0.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044d\u0442\u0438\u0445 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0439 \u044f \u043d\u0435 \u0437\u0430\u0448\u0451\u043b \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u0431\u0440\u0430\u043b\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0449\u0435 \u0438 \u044f \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0437\u043e\u043d \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u0430 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u0438\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e\u0431 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043f\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0451\u0439 \u0441 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 DP \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u043e \u043a\u0430\u043a \u043d\u0430\u043c \u0443\u0439\u0442\u0438 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430? \u0414\u043b\u044f DP \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438, \u0430 \u043d\u0435 \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0447\u0435\u043d\u044c \u0433\u0440\u0443\u0431\u043e \u0438 \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0442\u043e 2\u04452, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u0427\u0442\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u0434\u0430\u0451\u0442?<\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u0434\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437 \u0441 \u0448\u0430\u0433\u043e\u043c 2. \u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c 0, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 2\u04452 \u0438 \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 3\u04453 \u0438\u043b\u0438 4\u04454. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 (2, 2) \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u043b\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f\u0447\u0435\u0439\u043a\u0438 (1, 1), (2, 1) \u0438 (1, 2) \u043c\u044b \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f84\/606\/22e\/f8460622e0380fe79bffa85914bdb007.png\" width=\"221\" height=\"210\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f84\/606\/22e\/f8460622e0380fe79bffa85914bdb007.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f84\/606\/22e\/f8460622e0380fe79bffa85914bdb007.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0433\u043e\u043b \u0438 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u0448\u043b\u0438 1, \u0442\u043e \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u041c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0448\u0430\u0433 \u0434\u043e 1 \u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0432\u043f\u0440\u0430\u0432\u043e, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043c 0 \u0438\u043b\u0438 \u043a\u0440\u0430\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u043f\u0440\u0430\u0432\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0440\u0451\u0445 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 \u0441\u043b\u0435\u0432\u0430, \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043b\u0435\u0432\u0430-\u0441\u0432\u0435\u0440\u0445\u0443 \u0431\u044b\u043b\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u0434\u043b\u044f \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 3 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e X. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/247\/906\/c86\/247906c8670a1d09e2dfab383b922f3d.png\" width=\"243\" height=\"228\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/247\/906\/c86\/247906c8670a1d09e2dfab383b922f3d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/247\/906\/c86\/247906c8670a1d09e2dfab383b922f3d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0445 \u043c\u0435\u0441\u0442, \u043a\u0443\u0434\u0430 \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c \u043f\u043e 2 \u044f\u0447\u0435\u0439\u043a\u0438, \u0430 \u043d\u0438\u0436\u0435 \u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/957\/3f9\/47e\/9573f947ecf00804d964f7c30fdab98a.png\" width=\"243\" height=\"228\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/957\/3f9\/47e\/9573f947ecf00804d964f7c30fdab98a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/957\/3f9\/47e\/9573f947ecf00804d964f7c30fdab98a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0436\u0435\u043b\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044f \u043b\u0435\u0432\u0443\u044e \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0437\u043e\u043d\u044b, \u0433\u0434\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0437\u0435\u043b\u0435\u043d\u044b\u043c. \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0435\u0441\u043b\u0438 \u0436\u0435\u043b\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 0, \u0442\u043e \u043e \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/462\/9cc\/a33\/4629cca33d10e13147fd085b75fe3c8d.png\" width=\"243\" height=\"228\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/462\/9cc\/a33\/4629cca33d10e13147fd085b75fe3c8d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/462\/9cc\/a33\/4629cca33d10e13147fd085b75fe3c8d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c 1 \u043d\u0430 \u0436\u0435\u043b\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0438 \u043e\u043f\u044f\u0442\u044c \u0437\u0435\u043b\u0435\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 &#8212; \u043c\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0448\u043b\u0438 1, \u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0432\u043f\u0440\u0430\u0432\u043e c \u0448\u0430\u0433\u043e\u043c 1, \u0430 \u043d\u0435 2.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/189\/1a2\/6f3\/1891a26f3b807ab84c5376973ec9a76b.png\" width=\"243\" height=\"228\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/189\/1a2\/6f3\/1891a26f3b807ab84c5376973ec9a76b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/189\/1a2\/6f3\/1891a26f3b807ab84c5376973ec9a76b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u0434\u0432\u0438\u0433\u0430\u043b\u0438\u0441\u044c \u043f\u043e 1 \u0432\u043f\u0440\u0430\u0432\u043e \u0438 \u043f\u043e\u043f\u0430\u043b\u0438 \u043d\u0430 0 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 (7,2). \u041f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0437\u043e\u043d\u0443, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u0438 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c maxS (\u0441\u043e\u0445\u0440\u0430\u043d\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438), \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043c\u044b \u043d\u0430 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0438\u0436\u0435, \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 maxS \u0447\u0438\u0442\u0430\u043b\u0441\u044f \u0432\u0435\u0440\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\u0445 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0442\u044e\u043d\u0438\u043d\u0433\u043e\u043c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443. \u0418 \u044d\u0442\u043e &#8212; \u0442\u044e\u043d\u0438\u043d\u0433 2. \u041f\u0435\u0440\u0432\u044b\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0437\u0430\u0431\u0435\u0433 \u043f\u043e \u044f\u0447\u0435\u0439\u043a\u0430\u043c \u0441 \u0448\u0430\u0433\u043e\u043c 2.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u0440\u0430\u0441\u0447\u0451\u0442 \u0438\u043c\u0435\u044e\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 3, \u0442\u043e \u0432 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441\u043a\u0430\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u043c\u044b \u043d\u0430\u0439\u0434\u0451\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 3. \u041d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e \u043f\u043e\u043b\u043e\u0441\u043a\u0430\u0445 \u0438 \u0438\u0445 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0438. \u0422\u0443\u0442 \u043c\u044b \u044d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u0415\u0441\u043b\u0438 \u0431\u043b\u043e\u043a\u0438 \u043d\u0438\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u0441 \u0432\u0435\u0440\u0445\u043d\u0438\u0445 \u044f\u0447\u0435\u0435\u043a \u043f\u0435\u0440\u0435\u0439\u0434\u0443\u0442 \u0432\u043d\u0438\u0437.<\/p>\n<p>\u0422\u044e\u043d\u0438\u043d\u0433 3 &#8212; \u0435\u0441\u043b\u0438 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 maxS (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u044d\u0442\u043e \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438), \u0442\u043e \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u0431\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u043e\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u044b maxS. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0443\u0436\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 5\u04455 \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u043e\u043d\u044b 3\u04453, 4\u04453, \u0438\u043b\u0438 5\u04453 (\u0432\u044b \u0436\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0447\u0442\u043e 3 \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u0442\u0430 \u0437\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c), \u0442\u043e \u043e\u0431\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 6\u04456, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043c\u043e\u0433 \u0431\u044b \u0431\u044b\u0442\u044c \u043d\u0443\u0436\u0435\u043d.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/247\/776\/394\/2477763946e0bd4a60327e8a36cc7940.png\" width=\"485\" height=\"445\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/247\/776\/394\/2477763946e0bd4a60327e8a36cc7940.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/247\/776\/394\/2477763946e0bd4a60327e8a36cc7940.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u0443\u0436\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430 A, \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0436\u0435\u043b\u0442\u0443\u044e \u0437\u043e\u043d\u0443 B, \u043e\u043d\u0430 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 3, \u0447\u0442\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0436\u0435 \u043d\u0430\u0451\u0434\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b maxS == 5. \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u0437\u043e\u043d\u044b C \u043c\u044b \u0445\u043e\u0442\u044c \u0438 \u043d\u0430\u0448\u043b\u0438 &#171;\u0434\u0443\u0440\u0430\u0446\u043a\u0438\u0439&#187; \u043e\u0433\u0440\u044b\u0437\u043e\u043a 2\u04452 \u0432 \u0436\u0435\u043b\u0442\u043e\u0439 \u0437\u043e\u043d\u0435, \u043d\u043e \u0441\u0430\u043c\u0430 \u0437\u043e\u043d\u0430 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 6 \u0438 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442 6\u04456, \u0435\u0441\u043b\u0438 \u043c\u044b \u0435\u0433\u043e \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0442\u043e \u043c\u044b \u0435\u0433\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043c.<\/p>\n<p>\u0422\u044e\u043d\u0438\u043d\u0433 4 &#8212; \u0434\u043b\u044f \u043e\u0431\u0441\u0447\u0451\u0442\u0430 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"cs\">int scanRectangle(int startX, int startY, int endX) {   int maxS = 0;   for (int x = startX; x &lt;= endX; x++)   {     square[x, startY] += Math.Min(                           Math.Min(square[x, startY - 1], square[x - 1, startY]),                           square[x - 1, startY - 1]);     maxS = Math.Max(maxS, square[x, startY]);   }   startY++;   if (startY &lt; square.GetLength(0))     for (int x = startX; x &lt;= endX; x++)       if (square[x, startY] == 1)       {         square[x, startY] += Math.Min(                               Math.Min(square[x, startY - 1], square[x - 1, startY]),                               square[x - 1, startY - 1]);         maxS = Math.Max(maxS, square[x, startY]);       }   return maxS; }<\/code><\/pre>\n<p>\u0417\u043d\u0430\u044f \u0432\u044b\u0441\u043e\u0442\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 Y, \u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3f3\/331\/023\/3f333102336c0194e8a335a5342f93bb.png\" width=\"221\" height=\"210\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3f3\/331\/023\/3f333102336c0194e8a335a5342f93bb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3f3\/331\/023\/3f333102336c0194e8a335a5342f93bb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u043e\u043b\u044c, \u043e\u0442\u043c\u0435\u0447\u0435\u043d \u0436\u0435\u043b\u0442\u044b\u043c \u043d\u0430 (2, 2), \u043f\u043e\u0442\u043e\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u043e\u0432\u0438\u0442 1 \u043d\u0430 (4, 2), \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 (4, 1) \u043a\u0430\u043a \u043b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0433\u043e\u043b \u0434\u043b\u044f \u0437\u043e\u043d\u044b \u043e\u0431\u0441\u0447\u0451\u0442\u0430 (\u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0437\u043e\u043d\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u043f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c). \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0448\u0430\u0433 \u043d\u0430 1 \u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0432 5 \u0438 6 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043b\u043e\u0432\u0438\u043c \u0441\u043d\u043e\u0432\u0430 \u043d\u043e\u043b\u044c \u0432 7 \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u0412\u043e\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 \u0437\u043e\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u044b. \u0410 \u0442\u043e \u0447\u0442\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0441\u0432\u0435\u0442\u043b\u043e-\u043a\u043e\u0440\u0438\u0447\u043d\u0435\u0432\u044b\u043c &#8212; \u044d\u0442\u043e \u0442\u0435 \u044f\u0447\u0435\u0439\u043a\u0438, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u043e\u043d\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c DP. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043d\u0443\u043b\u0438 \u0442\u0430\u043c \u0438\u043b\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, DP \u0441\u0430\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1e8\/83d\/2e2\/1e883d2e2cce13d72761c6fdf9a5fdf8.png\" width=\"221\" height=\"210\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/1e8\/83d\/2e2\/1e883d2e2cce13d72761c6fdf9a5fdf8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1e8\/83d\/2e2\/1e883d2e2cce13d72761c6fdf9a5fdf8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418 maxS \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 2.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043a\u043e\u0434 \u043d\u0430 C# \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:<\/p>\n<pre><code class=\"cs\">const int scale = 1; int[,] square = new int[100 * scale, 100 * scale];  public int Zara6502() {     int maxS = 0;     int step = 2;     int currX = 0;     int Ysize = square.GetLength(0);     int Xsize = square.GetLength(1);     for (int currY = 1; currY &lt; Ysize; currY += 2)     {         int tempX0 = 0;         step = 2;         for (currX = 1; currX &lt; Xsize; currX += step)         {             if (step == 2) tempX0 = currX;             if (square[currX, currY] == 0)             {                 if (step == 1 &amp;&amp; (currX - tempX0) &gt; maxS)                   maxS = Math.Max(maxS, scanRectangle(tempX0, currY, currX - 1));                 step = 2;             }             else step = 1;         }         if (step == 1 &amp;&amp; (Xsize - tempX0) &gt; maxS)           maxS = Math.Max(maxS, scanRectangle(tempX0, currY, Xsize - 1));     }     if (maxS == 0)     {         for (int currY = 0; currY &lt; Ysize; currY += 2)             for (currX = 0; currX &lt; Xsize; currX++)                 if (square[currX, currY] == 1)                 {                     maxS = 1;                     return maxS;                 }         for (int currY = 1; currY &lt; Ysize; currY += 2)             for (currX = 0; currX &lt; Xsize; currX += 2)                 if (square[currX, currY] == 1)                 {                     maxS = 1;                     return maxS;                 }     }     return maxS; } int scanRectangle(int startX, int startY, int endX) {     int maxS = 0;     for (int x = startX; x &lt;= endX; x++)     {         square[x, startY] += Math.Min(                               Math.Min(square[x, startY - 1], square[x - 1, startY]),                               square[x - 1, startY - 1]);         maxS = Math.Max(maxS, square[x, startY]);     }     startY++;     if (startY &lt; square.GetLength(0))         for (int x = startX; x &lt;= endX; x++)             if (square[x, startY] == 1)             {                 square[x, startY] += Math.Min(                                       Math.Min(square[x, startY - 1], square[x - 1, startY]),                                       square[x - 1, startY - 1]);                 maxS = Math.Max(maxS, square[x, startY]);             }     return maxS; }<\/code><\/pre>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0430\u043a\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b:<\/p>\n<ol>\n<li>\n<p>random 50% &#8212; \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 0 \u0438 1 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u0440\u043e\u0433\u043e 50%<\/p>\n<\/li>\n<li>\n<p>random squares with noises &#8212; \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043e\u0442 2 \u0434\u043e 10 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 (width * 0.1), \u0434\u043b\u044f scale=1 \u044d\u0442\u043e 10 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 100\u0445100. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f 30% \u0448\u0443\u043c \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446<\/p>\n<\/li>\n<li>\n<p>empty &#8212; \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0443<\/p>\n<\/li>\n<li>\n<p>fullfill &#8212; \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432<\/p>\n<\/li>\n<li>\n<p>random squares no noises &#8212; \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043a\u0430\u043a \u043f.2, \u043d\u043e \u0431\u0435\u0437 \u0448\u0443\u043c\u0430<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0443 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<pre><code>random 50%: =========== | Method        | scale | Mean            | Error         | StdDev        | Ratio | RatioSD | Allocated | Alloc Ratio | |-------------- |------ |----------------:|--------------:|--------------:|------:|--------:|----------:|------------:| | Zara6502      | 1     |        19.85 us |      0.210 us |      0.196 us |  1.00 |    0.01 |         - |          NA | | petropavelMod | 1     |        94.99 us |      0.585 us |      0.518 us |  4.79 |    0.05 |         - |          NA | |               |       |                 |               |               |       |         |           |             | | Zara6502      | 10    |     7,690.34 us |    151.352 us |    155.427 us |  1.00 |    0.03 |       6 B |        1.00 | | petropavelMod | 10    |    26,028.98 us |    132.892 us |    124.307 us |  3.39 |    0.07 |       4 B |        0.67 | |               |       |                 |               |               |       |         |           |             | | Zara6502      | 100   | 1,097,519.83 us | 10,810.220 us | 10,111.886 us |  1.00 |    0.01 |     400 B |        1.00 | | petropavelMod | 100   | 3,357,881.64 us | 18,745.504 us | 16,617.401 us |  3.06 |    0.03 |     400 B |        1.00 |<\/code><\/pre>\n<pre><code>random squares with noises: =========================== | Method        | scale | Mean             | Error          | StdDev         | Ratio | RatioSD | Allocated | Alloc Ratio | |-------------- |------ |-----------------:|---------------:|---------------:|------:|--------:|----------:|------------:| | Zara6502      | 1     |         9.584 us |      0.1051 us |      0.0983 us |  1.00 |    0.01 |         - |          NA | | petropavelMod | 1     |        49.209 us |      0.1180 us |      0.0985 us |  5.13 |    0.05 |         - |          NA | |               |       |                  |                |                |       |         |           |             | | Zara6502      | 10    |     4,552.811 us |     27.2865 us |     24.1888 us |  1.00 |    0.01 |       3 B |        1.00 | | petropavelMod | 10    |    19,623.032 us |     12.4785 us |      9.7424 us |  4.31 |    0.02 |      12 B |        4.00 | |               |       |                  |                |                |       |         |           |             | | Zara6502      | 100   |   778,358.150 us |  5,154.4114 us |  4,569.2514 us |  1.00 |    0.01 |     400 B |        1.00 | | petropavelMod | 100   | 2,662,157.893 us | 21,424.1769 us | 20,040.1884 us |  3.42 |    0.03 |     400 B |        1.00 | <\/code><\/pre>\n<pre><code>empty: ====== | Method        | scale | Mean             | Error          | StdDev         | Ratio | RatioSD | Allocated | Alloc Ratio | |-------------- |------ |-----------------:|---------------:|---------------:|------:|--------:|----------:|------------:| | Zara6502      | 1     |         5.831 us |      0.0177 us |      0.0165 us |  1.00 |    0.00 |         - |          NA | | petropavelMod | 1     |        19.090 us |      0.0546 us |      0.0511 us |  3.27 |    0.01 |         - |          NA | |               |       |                  |                |                |       |         |           |             | | Zara6502      | 10    |     1,217.029 us |     12.5058 us |     11.0861 us |  1.00 |    0.01 |       1 B |        1.00 | | petropavelMod | 10    |    15,574.495 us |    114.6756 us |    107.2676 us | 12.80 |    0.14 |       6 B |        6.00 | |               |       |                  |                |                |       |         |           |             | | Zara6502      | 100   |   492,762.913 us |  7,201.3221 us |  6,736.1212 us |  1.00 |    0.02 |     400 B |        1.00 | | petropavelMod | 100   | 1,914,521.580 us | 29,803.5592 us | 27,878.2678 us |  3.89 |    0.07 |     400 B |        1.00 | <\/code><\/pre>\n<pre><code>fullfill: ========= | Method        | scale | Mean            | Error         | StdDev        | Ratio | RatioSD | Allocated | Alloc Ratio | |-------------- |------ |----------------:|--------------:|--------------:|------:|--------:|----------:|------------:| | Zara6502      | 1     |        11.37 us |      0.026 us |      0.023 us |  1.00 |    0.00 |         - |          NA | | petropavelMod | 1     |        19.09 us |      0.036 us |      0.032 us |  1.68 |    0.00 |         - |          NA | |               |       |                 |               |               |       |         |           |             | | Zara6502      | 10    |     7,560.39 us |     35.708 us |     33.401 us |  1.00 |    0.01 |       3 B |        1.00 | | petropavelMod | 10    |    15,161.26 us |     32.087 us |     28.444 us |  2.01 |    0.01 |       6 B |        2.00 | |               |       |                 |               |               |       |         |           |             | | Zara6502      | 100   | 1,152,131.31 us | 14,010.416 us | 13,105.352 us |  1.00 |    0.02 |     400 B |        1.00 | | petropavelMod | 100   | 2,157,440.79 us |  3,971.820 us |  3,100.936 us |  1.87 |    0.02 |     112 B |        0.28 | <\/code><\/pre>\n<pre><code>random squares no noises: ========================= | Method        | scale | Mean             | Error          | StdDev         | Ratio | RatioSD | Allocated | Alloc Ratio | |-------------- |------ |-----------------:|---------------:|---------------:|------:|--------:|----------:|------------:| | Zara6502      | 1     |         6.608 us |      0.0354 us |      0.0331 us |  1.00 |    0.01 |         - |          NA | | petropavelMod | 1     |        20.060 us |      0.0230 us |      0.0204 us |  3.04 |    0.01 |         - |          NA | |               |       |                  |                |                |       |         |           |             | | Zara6502      | 10    |     1,502.952 us |     11.9526 us |     10.5957 us |  1.00 |    0.01 |       1 B |        1.00 | | petropavelMod | 10    |    15,548.515 us |     96.1894 us |     89.9756 us | 10.35 |    0.09 |       6 B |        6.00 | |               |       |                  |                |                |       |         |           |             | | Zara6502      | 100   |   604,071.771 us |  5,431.8570 us |  4,815.1998 us |  1.00 |    0.01 |     400 B |        1.00 | | petropavelMod | 100   | 2,194,348.127 us | 13,435.8735 us | 12,567.9244 us |  3.63 |    0.03 |     112 B |        0.28 | <\/code><\/pre>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u0413\u043e\u0442\u043e\u0432 \u043e\u0442\u0431\u0438\u0432\u0430\u0442\u044c \u043b\u0435\u0442\u044f\u0449\u0438\u0435 \u043f\u043e\u043c\u0438\u0434\u043e\u0440\u044b \ud83d\ude42 \u0412\u0441\u0435\u043c \u0431\u043e\u0431\u0440\u0430!<\/p>\n<p>PS: \u043c\u043e\u0436\u0435\u0442 \u043a\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u044b\u043c \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u043c? \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 1000\u04451000 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0434\u043e \u044510 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 DP?<\/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\/904152\/\"> https:\/\/habr.com\/ru\/articles\/904152\/<\/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>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u043b\u0430 <a href=\"https:\/\/habr.com\/ru\/articles\/901190\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438 \u043d\u0443\u043b\u0435\u0439. \u0410\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u0435\u0451 \u0440\u0435\u0448\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b.<\/p>\n<p>\u042f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0434\u0443\u043c\u044b\u0432\u0430\u043b \u0435\u0451, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0435\u0437 \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. \u0422\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (DP). \u041d\u043e \u043c\u0435\u043d\u044f \u0432\u0441\u0451 \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0441\u0435 \u043f\u043e\u043b\u044f (\u0442\u043e\u0447\u043d\u0435\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e N*M \u0438 \u043f\u0440\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435 &#171;\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0435\u0434\u0438\u043d\u0438\u0446 * 4&#187;).<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b \u0447\u0442\u043e-\u0442\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0411\u0435\u0436\u0438\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e (\u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c), \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446, \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e, \u0432 \u043c\u0435\u0441\u0442\u0430\u0445 \u0441\u043a\u043b\u0435\u0435\u043a \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b. \u041d\u043e \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u043b\u043e \u043f\u043e\u0438\u0441\u043a, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445 \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0445\u043e\u0434\u0430 N*M.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0438 \u043c\u044b\u0441\u043b\u0438 \u043d\u0430\u0432\u0435\u043b\u0438 \u043c\u0435\u043d\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438, \u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0441\u043f\u0438\u0441\u043a\u0438 \u0438\u0437 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430 \u0438 \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u043e\u043b\u044c, \u0442\u043e \u043e\u043d \u0443\u0434\u0430\u043b\u0438\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u044d\u0442\u0443 \u044f\u0447\u0435\u0439\u043a\u0443. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0443\u0447\u0438, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u0431\u044b \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0438\u0436\u0435, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442 9\u04459 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0438 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0443\u0433\u043b\u043e\u0432 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0443\u043b\u0438. \u0418\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0430\u044f \u0437\u043e\u043d\u0430 \u0441\u0443\u0436\u0430\u0435\u0442\u0441\u044f (\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043b\u0435\u0432\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u0441\u043d\u0438\u0437\u0443 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435)<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0437\u043e\u043d\u0435 (2, 1), (9,8)<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0438 (1,2), (8, 9)<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0434\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e \u0438 \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438 \u043f\u0440\u0430\u0432\u044b\u0439 \u043d\u0438\u0436\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0430 (2, 1) \u0435\u0434\u0438\u043d\u0438\u0446\u0430, \u0430 \u0432\u043e\u0442 \u043d\u0430 (9, 8) \u0443\u0436\u0435 0.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044d\u0442\u0438\u0445 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0439 \u044f \u043d\u0435 \u0437\u0430\u0448\u0451\u043b \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u0431\u0440\u0430\u043b\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0449\u0435 \u0438 \u044f \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0437\u043e\u043d \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u0430 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u0438\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e\u0431 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043f\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0451\u0439 \u0441 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 DP \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u043e \u043a\u0430\u043a \u043d\u0430\u043c \u0443\u0439\u0442\u0438 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430? \u0414\u043b\u044f DP \u0443\u0437\u043a\u0438\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438, \u0430 \u043d\u0435 \u043d\u0443\u043b\u044f\u043c\u0438.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0447\u0435\u043d\u044c \u0433\u0440\u0443\u0431\u043e \u0438 \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0442\u043e 2\u04452, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u0442\u0432\u0451\u0440\u0442\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u0427\u0442\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u0434\u0430\u0451\u0442?<\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u0434\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437 \u0441 \u0448\u0430\u0433\u043e\u043c 2. \u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c 0, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 2\u04452 \u0438 \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 3\u04453 \u0438\u043b\u0438 4\u04454. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 (2, 2) \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u043b\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f\u0447\u0435\u0439\u043a\u0438 (1, 1), (2, 1) \u0438 (1, 2) \u043c\u044b \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0433\u043e\u043b \u0438 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430\u0448\u043b\u0438 1, \u0442\u043e \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. \u041c\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0448\u0430\u0433 \u0434\u043e 1 \u0438 \u0441\u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0432\u043f\u0440\u0430\u0432\u043e, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043c 0 \u0438\u043b\u0438 \u043a\u0440\u0430\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u043f\u0440\u0430\u0432\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u0432 \u0442\u0440\u0451\u0445 \u044f\u0447\u0435\u0439\u043a\u0430\u0445 \u0441\u043b\u0435\u0432\u0430, \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043b\u0435\u0432\u0430-\u0441\u0432\u0435\u0440\u0445\u0443 \u0431\u044b\u043b\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u0434\u043b\u044f \u0441\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 3 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e X. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0445 \u043c\u0435\u0441\u0442, \u043a\u0443\u0434\u0430 \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c \u043f\u043e 2 \u044f\u0447\u0435\u0439\u043a\u0438, \u0430 \u043d\u0438\u0436\u0435 \u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0436\u0435\u043b\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044f \u043b\u0435\u0432\u0443\u044e \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0437\u043e\u043d\u044b, \u0433\u0434\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0437\u0435\u043b\u0435\u043d\u044b\u043c. \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0435\u0441\u043b\u0438 \u0436\u0435\u043b\u0442\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 0, \u0442\u043e \u043e \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u043c.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c 1 \u043d\u0430 \u0436\u0435\u043b\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0438 \u043e\u043f\u044f\u0442\u044c \u0437\u0435\u043b\u0435\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 &#8212; \u043c\u044b \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0448\u043b\u0438 1, \u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0432\u043f\u0440\u0430\u0432\u043e c \u0448\u0430\u0433\u043e\u043c 1, \u0430 \u043d\u0435 2.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u0434\u0432\u0438\u0433\u0430\u043b\u0438\u0441\u044c \u043f\u043e 1 \u0432\u043f\u0440\u0430\u0432\u043e \u0438 \u043f\u043e\u043f\u0430\u043b\u0438 \u043d\u0430 0 \u0432 \u044f\u0447\u0435\u0439\u043a\u0435 (7,2). \u041f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0437\u043e\u043d\u0443, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u0438 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c maxS (\u0441\u043e\u0445\u0440\u0430\u043d\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438), \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043c\u044b \u043d\u0430 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0438\u0436\u0435, \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 maxS \u0447\u0438\u0442\u0430\u043b\u0441\u044f \u0432\u0435\u0440\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430\u0445 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0442\u044e\u043d\u0438\u043d\u0433\u043e\u043c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443. \u0418 \u044d\u0442\u043e &#8212; \u0442\u044e\u043d\u0438\u043d\u0433 2. \u041f\u0435\u0440\u0432\u044b\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0437\u0430\u0431\u0435\u0433 \u043f\u043e \u044f\u0447\u0435\u0439\u043a\u0430\u043c \u0441 \u0448\u0430\u0433\u043e\u043c 2.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u0440\u0430\u0441\u0447\u0451\u0442 \u0438\u043c\u0435\u044e\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 3, \u0442\u043e \u0432 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441\u043a\u0430\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u043c\u044b \u043d\u0430\u0439\u0434\u0451\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 3. \u041d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e \u043f\u043e\u043b\u043e\u0441\u043a\u0430\u0445 \u0438 \u0438\u0445 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0438. \u0422\u0443\u0442 \u043c\u044b \u044d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438. \u0415\u0441\u043b\u0438 \u0431\u043b\u043e\u043a\u0438 \u043d\u0438\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u0441 \u0432\u0435\u0440\u0445\u043d\u0438\u0445 \u044f\u0447\u0435\u0435\u043a \u043f\u0435\u0440\u0435\u0439\u0434\u0443\u0442 \u0432\u043d\u0438\u0437.<\/p>\n<p>\u0422\u044e\u043d\u0438\u043d\u0433 3 &#8212; \u0435\u0441\u043b\u0438 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0448\u043b\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 maxS (\u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u044d\u0442\u043e \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438), \u0442\u043e \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u0431\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u043e\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u044b maxS. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0443\u0436\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 5\u04455 \u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0437\u043e\u043d\u044b 3\u04453, 4\u04453, \u0438\u043b\u0438 5\u04453 (\u0432\u044b \u0436\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0447\u0442\u043e 3 \u0437\u0434\u0435\u0441\u044c \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u0442\u0430 \u0437\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c), \u0442\u043e \u043e\u0431\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 6\u04456, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043c\u043e\u0433 \u0431\u044b \u0431\u044b\u0442\u044c \u043d\u0443\u0436\u0435\u043d.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u0443\u0436\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430 A, \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0436\u0435\u043b\u0442\u0443\u044e \u0437\u043e\u043d\u0443 B, \u043e\u043d\u0430 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 3, \u0447\u0442\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0436\u0435 \u043d\u0430\u0451\u0434\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b maxS == 5. \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u0437\u043e\u043d\u044b C \u043c\u044b \u0445\u043e\u0442\u044c \u0438 \u043d\u0430\u0448\u043b\u0438 &#171;\u0434\u0443\u0440\u0430\u0446\u043a\u0438\u0439&#187; \u043e\u0433\u0440\u044b\u0437\u043e\u043a 2\u04452 \u0432 \u0436\u0435\u043b\u0442\u043e\u0439 \u0437\u043e\u043d\u0435, \u043d\u043e \u0441\u0430\u043c\u0430 \u0437\u043e\u043d\u0430 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 6 \u0438 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442 6\u04456, \u0435\u0441\u043b\u0438 \u043c\u044b \u0435\u0433\u043e \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0442\u043e \u043c\u044b \u0435\u0433\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043c.<\/p>\n<p>\u0422\u044e\u043d\u0438\u043d\u0433 4 &#8212; \u0434\u043b\u044f \u043e\u0431\u0441\u0447\u0451\u0442\u0430 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"cs\">int scanRectangle(int startX, int startY, int endX) {   int maxS = 0;   for (int x = startX; x &lt;= endX; x++)   {     square[x, startY] += Math.Min(                           Math.Min(square[x, startY - 1], square[x - 1, startY]),                           square[x - 1, startY - 1]);     maxS = Math.Max(maxS, square[x, startY]);   }   startY++;   if (startY &lt; square.GetLength(0))     for (int x = startX; x &lt;= endX; x++)       if (square[x, startY] == 1)       {         square[x, startY] += Math.Min(                               Math.Min(square[x, startY - 1], square[x - 1, startY]),                               square[x - 1, startY - 1]);         maxS = Math.Max(maxS, square[x, startY]);       }   return maxS; }<\/code><\/pre>\n<p>\u0417\u043d\u0430\u044f \u0432\u044b\u0441\u043e\u0442\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 Y, \u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043c\u044b \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u0441\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u043e\u043b\u044c, \u043e\u0442\u043c\u0435\u0447\u0435\u043d \u0436\u0435\u043b\u0442\u044b\u043c \u043d\u0430 (2, 2), \u043f\u043e\u0442\u043e\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u043e\u0432\u0438\u0442 1 \u043d\u0430 (4, 2), \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 (4, 1) \u043a\u0430\u043a \u043b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0433\u043e\u043b \u0434\u043b\u044f \u0437\u043e\u043d\u044b \u043e\u0431\u0441\u0447\u0451\u0442\u0430 (\u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0437\u043e\u043d\u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u043f\u0443\u043d\u043a\u0442\u0438\u0440\u043e\u043c). \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u0448\u0430\u0433 \u043d\u0430 1 \u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0432 5 \u0438 6 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043b\u043e\u0432\u0438\u043c \u0441\u043d\u043e\u0432\u0430 \u043d\u043e\u043b\u044c \u0432 7 \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u0412\u043e\u0442 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 \u0437\u043e\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u0438\u0446\u044b. \u0410 \u0442\u043e \u0447\u0442\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0441\u0432\u0435\u0442\u043b\u043e-\u043a\u043e\u0440\u0438\u0447\u043d\u0435\u0432\u044b\u043c &#8212; \u044d\u0442\u043e \u0442\u0435 \u044f\u0447\u0435\u0439\u043a\u0438, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u043e\u043d\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c DP. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u043d\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043d\u0443\u043b\u0438 \u0442\u0430\u043c \u0438\u043b\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, DP \u0441\u0430\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0418 maxS \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 2.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043a\u043e\u0434 \u043d\u0430 C# \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:<\/p>\n<pre><code class=\"cs\">const int scale = 1; int[,] square = new int[100 * scale, 100 * scale];  public int Zara6502() {     int maxS = 0;     int step = 2;     int currX = 0;     int Ysize = square.GetLength(0);     int Xsize = square.GetLength(1);     for (int currY = 1; currY &lt; Ysize; currY += 2)     {         int tempX0 = 0;         step = 2;         for (currX = 1; currX &lt; Xsize; currX += step)         {             if (step == 2) tempX0 = currX;             if (square[currX, currY] == 0)             {                 if (step == 1 &amp;&amp; (currX - tempX0) &gt; maxS)                   maxS = Math.Max(maxS, scanRectangle(tempX0, currY, currX - 1));                 step = 2;             }             else step = 1;         }         if (step == 1 &amp;&amp; (Xsize - tempX0) &gt; maxS)           maxS = Math.Max(maxS, scanRectangle(tempX0, currY, Xsize - 1));     }     if (maxS == 0)     {         for (int currY = 0; currY &lt; Ysize; currY += 2)             for (currX = 0; currX &lt; Xsize; currX++)                 if (square[currX, currY] == 1)                 {                     maxS = 1;                     return maxS;                 }         for (int currY = 1; currY &lt; Ysize; currY += 2)             for (currX = 0; currX &lt; Xsize; currX += 2)                 if (square[currX, currY] == 1)                 {                     maxS = 1;                     return maxS;                 }     }     return maxS; } int scanRectangle(int startX, int startY, int endX) {     int maxS = 0;     for (int x = startX; x &lt;= endX; x++)     {         square[x, startY] += Math.Min(                               Math.Min(square[x, startY - 1], square[x - 1, startY]),                               square[x - 1, startY - 1]);         maxS = Math.Max(maxS, square[x, startY]);     }     startY++;     if (startY &lt; square.GetLength(0))         for (int x = startX; x &lt;= endX; x++)             if (square[x, startY] == 1)             {                 square[x, startY] += Math.Min(                                       Math.Min(square[x, startY - 1], square[x - 1, startY]),                                       square[x - 1, startY - 1]);                 maxS = Math.Max(maxS, square[x, startY]);             }     return maxS; }<\/code><\/pre>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0430\u043a\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b:<\/p>\n<ol>\n<li>\n<p>random 50% &#8212; \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 0 \u0438 1 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u0440\u043e\u0433\u043e 50%<\/p>\n<\/li>\n<li>\n<p>random squares with noises &#8212; \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043e\u0442 2 \u0434\u043e 10 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 (width * 0.1), \u0434\u043b\u044f scale=1 \u044d\u0442\u043e 10 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 100\u0445100. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f 30% \u0448\u0443\u043c \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446<\/p>\n<\/li>\n<li>\n<p>empty &#8212; \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0433\u043b\u0443<\/p>\n<\/li>\n<li>\n<p>fullfill &#8212; \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432<\/p>\n<\/li>\n<li>\n<p>random squares no noises &#8212; \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043a\u0430\u043a<\/p>\n<\/li>\n<\/ol>\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-457397","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457397","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=457397"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457397\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}