{"id":304586,"date":"2020-05-31T21:00:11","date_gmt":"2020-05-31T21:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304586"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304586","title":{"rendered":"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u00ab\u0442\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a\u00bb \u043d\u0430 Julia: \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/504624\/\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f (<a href=\"https:\/\/habr.com\/ru\/post\/462411\/\">\u043e\u043f\u044f\u0442\u044c<\/a>) \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f, \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0441 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 &quot;\u0442\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a&quot;. \u0417\u0430\u043e\u0434\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0433\u0434\u0435 \u0438 \u0437\u0430\u0447\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0432 Julia \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0430 \u0433\u0434\u0435 \u043e\u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb6\/d45\/cf9\/cb6d45cf916546ae1085088c0c5dcd09.svg\" alt=\"$S$\" data-tex=\"inline\"><\/math> \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/94d\/13e\/e0a\/94d13ee0aadd7f17977e0d279af38d42.svg\" alt=\"$M$\" data-tex=\"inline\"><\/math> \u0435\u0433\u043e \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0432\u044b\u0431\u043e\u0440\u0435 \u043f\u043e\u043f\u0430\u0440\u043d\u043e \u043d\u0435\u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/26f\/59a\/639\/26f59a6394bdea73b7bc4894de4498f0.svg\" alt=\"$\\lbrace M_i \\rbrace$\" data-tex=\"inline\"><\/math>, \u0432 \u0441\u0443\u043c\u043c\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb6\/d45\/cf9\/cb6d45cf916546ae1085088c0c5dcd09.svg\" alt=\"$S$\" data-tex=\"inline\"><\/math>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb6\/d45\/cf9\/cb6d45cf916546ae1085088c0c5dcd09.svg\" alt=\"$S$\" data-tex=\"inline\"><\/math> \u2014 \u044d\u0442\u043e \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0438\u0433\u0443\u0440\u0430, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a71\/a80\/8de\/a71a808de50a9ec48162d4f40e59ea01.svg\" alt=\"$M_i$\" data-tex=\"inline\"><\/math> \u2014 \u044d\u0442\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0438 &quot;\u043f\u0430\u0440\u043a\u0435\u0442\u0430&quot;, \u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0437\u0430\u043c\u043e\u0441\u0442\u0438\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u0443 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u043a\u0435\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u0433\u0443\u0440 \u0438\u0437 \u0444\u0438\u0433\u0443\u0440\u043e\u043a \u043f\u0435\u043d\u0442\u0430\u043c\u0438\u043d\u043e<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/809\/c07\/18e\/809c0718eac4354261c33d2ea526f4c8.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 (\u0438\u0437 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438):<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/92b\/756\/5e1\/92b7565e12fdcfa3d3fa317f3576a291.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb6\/d45\/cf9\/cb6d45cf916546ae1085088c0c5dcd09.svg\" alt=\"$S$\" data-tex=\"inline\"><\/math> \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/94d\/13e\/e0a\/94d13ee0aadd7f17977e0d279af38d42.svg\" alt=\"$M$\" data-tex=\"inline\"><\/math> \u0437\u0430\u0434\u0430\u0447\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043a\u0430\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (0\/1), \u0433\u0434\u0435 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bf8\/3b5\/32c\/bf83b532cd867d34004f8eded8c5c79a.svg\" alt=\"$i$\" data-tex=\"inline\"><\/math>-\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb6\/d45\/cf9\/cb6d45cf916546ae1085088c0c5dcd09.svg\" alt=\"$S$\" data-tex=\"inline\"><\/math>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0441\u044f \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a71\/a80\/8de\/a71a808de50a9ec48162d4f40e59ea01.svg\" alt=\"$M_i$\" data-tex=\"inline\"><\/math>. \u0417\u0430\u0434\u0430\u0447\u0430 \u0442\u043e\u0433\u0434\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0432\u044b\u0431\u043e\u0440\u0435 \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u0439\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0431\u044b\u043b\u0430 \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u0442\u0440\u0438\u0446\u044b:<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u2116 \u0441\u0442\u0440\u043e\u043a\u0438<\/th>\n<th>A<\/th>\n<th>B<\/th>\n<th>C<\/th>\n<th>D<\/th>\n<th>E<\/th>\n<th>F<\/th>\n<th>G<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 1, 4 \u0438 5 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f NP-\u043f\u043e\u043b\u043d\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c <em>\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c<\/em> \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0414\u043e\u043d\u0430\u043b\u044c\u0434\u043e\u043c \u041a\u043d\u0443\u0442\u043e\u043c, \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 &quot;\u0442\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a&quot;.<\/p>\n<p>  <\/p>\n<h2 id=\"algoritm-x\">&quot;\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c X&quot;<\/h2>\n<p>  <\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u041a\u043d\u0443\u0442\u043e\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/arxiv.org\/pdf\/cs\/0011047v1.pdf\" rel=\"nofollow\">&quot;\u0422\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438&quot;<\/a>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a \u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c. \u041f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u0412\u0445\u043e\u0434:     `matr` - \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0438\u0437 \u043d\u0435\u043f\u043e\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     `solution` - \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f     `k` - \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430  \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 `Algorithm_x`     \u0415\u0441\u043b\u0438 `matr` \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043f\u043e\u043a\u0440\u044b\u0442\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432:         \u0412\u0435\u0440\u043d\u0443\u0442\u044c (\u0438\u043b\u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438) `solution`.     \u0418\u043d\u0430\u0447\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 `c`.     \u041f\u043e\u043a\u0440\u044b\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 `c`.     \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a `r`, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441\u043e \u0441\u0442\u043e\u0431\u0446\u043e\u043c `c`:         \u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c `solution[k] = r`.         \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 `j`, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441 `r`:             \u041f\u043e\u043a\u0440\u044b\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 `j`.         \u0412\u044b\u0437\u0432\u0430\u0442\u044c `Algorithm_x(matr, solution, k+1)`.         \u0415\u0441\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0448\u0451\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e.         (\u0431\u044d\u043a\u0442\u0440\u0435\u043a\u0438\u043d\u0433)         \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 `j`, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441 `r`:             \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 `j`.     \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 `c`.     \u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u0438\u0437 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b.<\/code><\/pre>\n<p>  <\/p>\n<p>&quot;\u041f\u043e\u043a\u0440\u044b\u0442\u0438\u0435&quot; \u0441\u0442\u043e\u043b\u0431\u0446\u0430 <code>c<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u044b\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0435\u0433\u043e \u0438 \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f (\u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0435\u0441\u043b\u0438 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043f\u043e\u043a\u0440\u044b\u0442 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 <code>r<\/code>, \u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0435\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f). \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0438 \u0441\u0442\u0440\u043e\u043a \u043e\u0431\u0440\u0430\u0442\u043d\u043e. <\/p>\n<p>  <\/p>\n<h2 id=\"tancuyuschie-ssylki\">\u0422\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043e\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0435\u0442\u0432\u0435\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0445 \u043d\u0430 \u043c\u0435\u0441\u0442\u043e, \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u041a\u043d\u0443\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 &quot;\u0442\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438&quot;, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0432 \u0432\u0438\u0434\u0435 \u0442\u043e\u0440\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0418\u0434\u0435\u044f \u0442\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 <code>node<\/code> \u0438\u0437 \u0434\u0432\u0443\u0441\u0432\u044f\u0437\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e: \u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 <code>prev<\/code> \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0438 <code>next<\/code> \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0442\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">node.next.prev = node.prev node.prev.next = node.next<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0430\u043c \u0443\u0437\u0435\u043b \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0443\u0437\u043b\u044b \u0431\u044b\u043b\u0438 \u0435\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u044f\u043c\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0443\u0437\u0435\u043b \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">node.next.prev = node node.prev.next = node<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0438\u0445 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0431\u0443\u043b\u0435\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u043f\u0438\u0441\u043a\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u0434\u0432\u0443\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c. \u0414\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a (\u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u041a\u043d\u0443\u0442\u0430):<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tc\/3s\/as\/tc3sasxecpstd05adtr1juctrvc.png\"><\/p>\n<p>  <\/p>\n<p><em>h<\/em> \u2014 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0443\u0437\u0435\u043b \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0432 \u0443\u0437\u043b\u0430\u0445 <em>A<\/em> \u2014 <em>G<\/em> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438 \u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0440\u043e\u043a, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0435 \u0438 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u0435. \u0422\u0430\u043a\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0443\u0437\u043b\u044b \u0445\u0440\u0430\u043d\u044f\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0442\u0446\u0435\u043f\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u0438 \u043b\u0435\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439.<\/li>\n<li>\u041f\u0440\u043e\u0445\u043e\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0432\u043d\u0438\u0437, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 $r$ \u043e\u0442\u0446\u0435\u043f\u0438\u0442\u044c \u043e\u0442 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443 \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0435, \u043a\u0440\u043e\u043c\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e $r$.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 (\u043f\u0440\u043e\u0445\u043e\u0434\u044f \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u043e\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0430) \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438, \u0437\u0430\u0442\u0435\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 \u0440\u044f\u0434\u0443. \u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Julia.<\/p>\n<p>  <\/p>\n<p>\u0423\u0437\u0435\u043b \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0443\u0437\u043b\u044b \u0441\u043b\u0435\u0432\u0430, \u0441\u043f\u0440\u0430\u0432\u0430, \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443 \u0438 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0443\u0437\u0435\u043b \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">mutable struct LinkNode     left     right     above     below     col     # \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u043e\u0439 \u043a \u0441\u0442\u043e\u043b\u0431\u0446\u0443     function LinkNode(col)         self = new()         self.above = self.below = self.right = self.left = self         self.col = col         return self     end     # \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c (\u0434\u043b\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430)     function LinkNode()         self = new()         self.above = self.below = self.right = self.left = self         return self     end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0413\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0443\u0437\u0435\u043b \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">mutable struct LinkColumn     links     size     id     function LinkColumn(id)         self = new()         links = LinkNode(self)         self.links = links         self.size = 0         self.id = id         return self     end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u043c \u0443\u0437\u043b\u043e\u043c, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u043c\u0430\u0442\u0440\u0438\u0446.<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">struct LinkMatrix     root_node     #=     \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438\u0437 \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430,     \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     =#     function LinkMatrix(ids)         root = LinkNode()         self = new(root)         prev = root         for id in ids             col = LinkColumn(id)             collinks = col.links             collinks.left = prev             collinks.right = root             prev.right = collinks             root.left = collinks             prev = collinks         end         return self     end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">function algorithm_x!(matr, solution=FullRow[])     if iscovered(matr)         return solution     end     col = choose_col(matr)     cover!(col)     for node in col         push!(solution, FullRow(node))         for j in RestRow(node)             cover!(j.col)         end         if !isnothing(algorithm_x!(matr, solution))             return solution         end         node = pop!(solution).node         # \u0432\u0430\u0436\u0435\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f         for j in Iterators.reverse(RestRow(node))             uncover!(j.col)         end     end     uncover!(col)     return end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\"># \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043f\u043e\u043a\u0440\u044b\u0442\u0430 \u043b\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e iscovered(matr) = matr.root === matr.root.right  # \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u044b function Base.iterate(matr::LinkMatrix, next = matr.root.right)     next === matr.root &amp;&amp; return     return (next.col, next.right) end  #= \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u0432 \u0441\u0442\u0440\u043e\u043a\u0435, \u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e =# struct RestRow     node end  # \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0443\u0437\u043b\u0430\u043c \u0432 \u0441\u0442\u0440\u043e\u043a\u0435, \u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e function Base.iterate(row::RestRow, next = row.node.right)     next === row.node &amp;&amp; return     return (next, next.right) end  # \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e function Base.iterate(row::Iterators.Reverse{&lt;:RestRow}, next = row.itr.node.left)     next === row.itr.node &amp;&amp; return     return (next, next.left) end  # \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b struct FullRow     node end  # \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 function Base.iterate(row::FullRow)     node = row.node     return (node, node.right) end  function Base.iterate(row::FullRow, next)     next === row.node &amp;&amp; return     return (next, next.right) end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 &quot;S-\u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0438&quot; \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0435\u0433\u043e \u0441\u0442\u0440\u043e\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">function choose_col(matr)     bestcol = matr.root.right.col     s = bestcol.size     for col in matr         l = col.size         l &lt; 2 &amp;&amp; return col # \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0440\u0430\u0437\u0443         if l &lt; s             s, bestcol = l, col         end     end     return bestcol end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <code>cover!(col)<\/code> &quot;\u043e\u0442\u0446\u0435\u043f\u043b\u044f\u0435\u0442&quot; \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u0438 \u043b\u0435\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439 (\u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u2014 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0441\u0432\u044f\u0437\u0438 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c), \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0438 \u043e\u0442\u0446\u0435\u043f\u043b\u044f\u0435\u0442 \u0443\u0437\u043b\u044b \u043e\u0442 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443 (\u043a\u0440\u043e\u043c\u0435 \u0442\u0435\u0445 \u0441\u0441\u044b\u043b\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u0435\u0434\u0443\u0442 \u043a \u0441\u0442\u043e\u043b\u0431\u0446\u0443 <code>col<\/code>). \u041a\u043e\u0433\u0434\u0430 \u0443\u0437\u0435\u043b \u043e\u0442\u0446\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438, \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0433\u0434\u0435 \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">function cover!(col)     detach_rl!(col.links)     for node in col         for elt in RestRow(node)             detach_ab!(elt)         end     end end  # \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043e\u0442 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 function detach_rl!(node)     node.right.left = node.left     node.left.right = node.right     return node end  # \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043e\u0442 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u043d\u0438\u0437\u0443 function detach_ab!(node)     node.above.below = node.below     node.below.above = node.above     node.col.size -= 1     return node end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, <code>uncover!(col)<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0451 \u043d\u0430\u0437\u0430\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">function uncover!(col)     # \u0432\u0430\u0436\u0435\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443     for node in Iterators.reverse(col)         # \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0435 \u0432\u0430\u0436\u0435\u043d         for elt in RestRow(node)             restore_ab!(elt)         end     end     restore_rl!(col.links) end  function restore_rl!(node)     node.right.left = node     node.left.right = node     return node end  function restore_ab!(node)     node.above.below = node     node.below.above = node     node.col.size += 1     return node end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0451, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u2014 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">#= matr - \u043c\u0430\u0442\u0440\u0438\u0446\u0430, \u043a\u0443\u0434\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 col_ids - \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438 =# function insert_row!(matr, col_ids)     isempty(col_ids) &amp;&amp; return     num_inserted = 0     first_in_row = nothing     prevnode = nothing     # \u0438\u0434\u0451\u043c \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c, \u0435\u0441\u043b\u0438 id \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 - \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b, \u043f\u0440\u0438\u0446\u0435\u043f\u043b\u044f\u0435\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0435     for col in matr         if col.id in col_ids             newnode = LinkNode(col)             if isnothing(first_in_row)                 first_in_row = newnode             end             first_in_row.left = newnode             newnode.right = first_in_row             if !isnothing(prevnode)                 prevnode.right = newnode                 newnode.left = prevnode             end             prevnode = newnode             num_inserted += 1             # \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043d\u0430\u0439\u0434\u0435\u043d\u044b - \u043f\u043e\u0434\u0446\u0435\u043f\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043a \u043c\u0430\u0442\u0440\u0438\u0446\u0435             if num_inserted == length(col_ids)                 for node in FullRow(first_in_row)                     col = node.col                     collinks = col.links                     lastnode = collinks.above                     col.size += 1                     node.above = lastnode                     node.below = collinks                     lastnode.below = node                     collinks.above = node                 end                 return first_in_row             end         end     end     #=     \u0441\u044e\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0448\u043b\u0438 \u0432\u0441\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b     \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445     \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c     =#     return end<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"skorost-raboty\">\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0441\u0443\u0434\u043e\u043a\u0443 \u0438 \u0437\u0430\u043c\u0435\u0440\u0438\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0421\u0443\u0434\u043e\u043a\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>(:row, row, num)<\/code> \u2014 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 <code>row<\/code> \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u043e <code>num<\/code><\/li>\n<li><code>(:col, col, num)<\/code> \u2014 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 <code>col<\/code> \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u043e <code>num<\/code><\/li>\n<li><code>(:block, col, num)<\/code> \u2014 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 <code>block<\/code> \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u043e <code>num<\/code><\/li>\n<li>(\u0441\u0430\u043c\u043e\u0435 \u0445\u0438\u0442\u0440\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435) <code>(:fill, row, col)<\/code> \u2014 \u043d\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 <code>col<\/code> \u0438 \u0441\u0442\u0440\u043e\u043a\u0438 <code>row<\/code> \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u043e<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u0435\u0442\u043e\u043a \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0443\u0436\u0435 &quot;\u043d\u0430\u043a\u0440\u044b\u0442\u0430&quot;, \u0438 \u0438\u0445 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e (\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 &quot;\u0437\u0430\u043a\u0440\u044b\u0442\u044c&quot;).<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">function sudoku2xcover(fill)     ncells = size(fill)     side = ncells[1]     side == ncells[2] || throw(ArgumentError(&quot;Invalid matrix size $ncells&quot;))     blockside = isqrt(side)     blockside^2 == side || throw(ArgumentError(&quot;Side $side is not a full square&quot;))     row_constr = trues(ncells)     col_constr = trues(ncells)     blk_constr = trues(ncells)     for col in 1:side, row in 1:side         num = fill[row,col]         if num in 1:side             block = col - (col - 1) % blockside + (row - 1) \u00f7 blockside             row_constr[row, num] = false             col_constr[col, num] = false             blk_constr[block, num] = false         end     end     constr = collect((:row, row, num) for row in 1:side, num in 1:side if row_constr[row,num])     append!(constr, (:col, col, num) for col in 1:side, num in 1:side if col_constr[col,num])     append!(constr, (:block, block, num) for block in 1:side, num in 1:side if blk_constr[block,num])     append!(constr, (:fill, row, col) for row in 1:side, col in 1:side if !(fill[row,col] in 1:side))     matr = LinkMatrix(constr)     for row in 1:side, col in 1:side, num in 1:side         block = col - (col - 1) % blockside + (row - 1) \u00f7 blockside         if row_constr[row,num] &amp;&amp; col_constr[col,num] &amp;&amp; blk_constr[block,num] &amp;&amp; !(fill[row,col] in 1:side)             col_ids = (:row, row, num), (:col, col, num), (:block, block, num), (:fill, row, col)             insert_row!(matr, col_ids)         end     end     return matr end  function sol2matr(soln, fieldsize)     ans = zeros(Int, fieldsize)     for node in soln         indval = row2indval(node)         ans[indval.ind] = indval.val     end     return ans end  function row2indval(dlrow)     row, col, n = 0,0,0     for j in dlrow         constr = j.col.id         if constr[1] === :fill             _, row, col = constr         else             _, _, n = constr         end         all(&gt;(0), (row, col, n)) &amp;&amp; break     end     return (ind = CartesianIndex(row, col), val = n) end  function sudoku(fill)     cover = sudoku2xcover(fill)     soln = sol2matr(algorithm_x!(cover), size(fill))     soln .+= fill     return soln end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f &quot;\u0441\u0430\u043c\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0441\u0443\u0434\u043e\u043a\u0443&quot; \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/www.sudokusnake.com\/goldennugget.php\" rel=\"nofollow\">&quot;\u0417\u043e\u043b\u043e\u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0440\u043e\u0434\u043e\u043a&quot;<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">const testpuzzle = [         0 0 0 0 0 0 0 3 9;         0 0 0 0 1 0 0 0 5;         0 0 3 0 0 5 8 0 0;         0 0 8 0 0 9 0 0 6;         0 7 0 0 2 0 0 0 0;         1 0 0 4 0 0 0 0 0;         0 0 9 0 0 8 0 5 0;         0 2 0 0 0 0 6 0 0;         4 0 0 7 0 0 0 0 0     ] julia&gt; using BenchmarkTools  julia&gt; @btime sudoku(testpuzzle);   33.012 ms (115869 allocations: 3.40 MiB)<\/code><\/pre>\n<p>  <\/p>\n<p>(\u043e\u0442\u0432\u0435\u0442 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043f\u043e\u0439\u043b\u0438\u0442\u044c)<br \/>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 0.1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0411\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c &quot;\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 \u0441\u0438\u0448\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435&quot;, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u043b\u0430\u0436\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h2 id=\"uskoryaem-rabotu-prostaviv-tipy\">\u0423\u0441\u043a\u043e\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443, \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u0438\u043f\u044b<\/h2>\n<p>  <\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u043b\u044f \u0441 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c (\u043a\u043e\u0433\u0434\u0430 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044f \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d, \u043e\u043d \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u0430\u043a <code>Any<\/code>). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u043f\u043e\u043b\u044f\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043a\u0441\u0438\u043d\u0433 \u0438 \u0430\u043d\u0431\u043e\u043a\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0442\u0438\u043f\u044b \u043f\u043e\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0418 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0432\u0435\u0441\u0451\u043b\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\"># \u0442\u0430\u043a \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442 mutable struct LinkNode     left::LinkNode     right::LinkNode     above::LinkNode     below::LinkNode     col::LinkColumn end  mutable struct LinkColumn     links::LinkNode     size::Int     id::Any end<\/code><\/pre>\n<p>  <\/p>\n<p>\u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>LinkColumn<\/code> \u2014 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 <code>LinkNode<\/code>. \u041f\u043e \u0442\u043e\u0439 \u0436\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u0440\u0432\u0430 <code>LinkColumn<\/code>, \u0430 \u043f\u043e\u0442\u043e\u043c <code>LinkNode<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b. \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0438\u043f \u043f\u043e\u043b\u044f <code>col<\/code> \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>LinkNode<\/code> \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0430 \u043f\u043e\u043b\u0435 <code>links<\/code> \u0432 <code>LinkColumn<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0438\u043f <code>LinkNode{LinkColumn}<\/code>. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u043b\u044f <code>id<\/code>, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0443\u0435\u043c \u0438 <code>LinkColumn<\/code> \u0442\u0438\u043f\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">mutable struct LinkNode{C}     left::LinkNode{C}     right::LinkNode{C}     above::LinkNode{C}     below::LinkNode{C}     col::C     function LinkNode(col::C) where {C}         self = new{C}()         self.above = self.below = self.right = self.left = self         self.col = col         return self     end     function LinkNode{C}() where {C}         self = new{C}()         self.above = self.below = self.right = self.left = self         return self     end end  mutable struct LinkColumn{T}     links::LinkNode{LinkColumn{T}}     size::Int     id::T     function LinkColumn{T}(id) where {T}         self = new{T}()         links = LinkNode(self)         self.links = links         self.size = 0         self.id = id         return self     end end  LinkColumn(id::T) where {T} = LinkColumn{T}(id)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 <code>LinkMatrix<\/code> \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">struct LinkMatrix{T}     root::LinkNode{LinkColumn{T}}     function LinkMatrix{T}(ids) where {T}         root = LinkNode{LinkColumn{T}}()         self = new{T}(root)         prev = root         for id in ids             col = LinkColumn{T}(id)             collinks = col.links             collinks.left = prev             collinks.right = root             prev.right = collinks             root.left = collinks             prev = collinks         end         return self     end end  LinkMatrix(ids) = LinkMatrix{eltype(ids)}(ids)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f\u044b \u043f\u043e\u043b\u0435\u0439 \u0432\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">struct RestRow{L&lt;:LinkNode}     node::L end  struct FullRow{L&lt;:LinkNode}     node::L end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">julia&gt; @btime sudoku(testpuzzle);   777.426 \u03bcs (6803 allocations: 209.91 KiB)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u043e\u0441\u044c <strong>\u0441 33 \u043c\u0441 \u0434\u043e 0.8 \u043c\u0441<\/strong> \u043f\u0440\u0438 \u0442\u043e\u043c, \u0447\u0442\u043e <strong>\u0442\u0438\u043f\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0438\u0433\u0434\u0435, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u043b\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440<\/strong>, \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f <code>iterate<\/code>, \u0433\u0434\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0442\u0438\u043f\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0442\u0438\u043f\u0430 \u0435\u0449\u0451 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2014 \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b <code>algorithm_x!<\/code>, \u0433\u0434\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0441 \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">function algorithm_x!(matr::LinkMatrix{T}) where {T}     RowType = FullRow{LinkNode{LinkColumn{T}}}     solution=RowType[]     return algorithm_x!(matr, solution) end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">julia&gt; @btime sudoku(testpuzzle);   547.812 \u03bcs (3603 allocations: 129.16 KiB)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0432 \u043f\u043e\u043b\u0441\u043e\u0442\u043d\u0438 \u0440\u0430\u0437. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043d\u0435\u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0438\u043b\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u2014 \u0432 \u043f\u043e\u043b\u044f\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 (\u0433\u0434\u0435, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0442\u0438\u043f\u0430\u0445 \u043f\u043e\u043b\u0435\u0439 \u0442\u0430\u043a \u0438 \u0442\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c\u0441\u044f). \u0421\u0438\u043b\u044c\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u2014 \u0435\u0441\u043b\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u0435\u0437 \u0442\u0438\u043f\u0430 (\u0442.\u0435. \u0441 \u0442\u0438\u043f\u043e\u043c <code>Any<\/code>), \u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0442\u0438\u043f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"julia\">struct SomeStruct{T}     data::T end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u043b\u0435 <code>data<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0435\u043c \u0443\u0433\u043e\u0434\u043d\u043e, \u043d\u043e \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0414\u0438\u0437\u0430\u0439\u043d \u044f\u0437\u044b\u043a\u0430 Julia \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a &quot;\u044f\u0437\u044b\u043a \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0432&quot;. \u0420\u0430\u0437\u0443\u043c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0438\u043f\u043e\u0432 \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0438 JIT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 Computer Science \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u041e\u0441\u043e\u0431\u043e \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 DLX \u041a\u043d\u0443\u0442\u0430. \u041d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u043a\u0430\u0445 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 1-2 \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u043c, \u043a\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Julia (\u0438 \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u0440\u043e\u0431\u0443\u0435\u0442 \u044f\u0437\u044b\u043a \u043f\u043e\u0441\u043b\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439), \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432, \u0431\u043e\u043a\u0441\u0438\u043d\u0433\u0430 \u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/504624\/\"> https:\/\/habr.com\/ru\/post\/504624\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/504624\/\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f (<a href=\"https:\/\/habr.com\/ru\/post\/462411\/\">\u043e\u043f\u044f\u0442\u044c<\/a>) \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f, \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0441 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 &quot;\u0442\u0430\u043d\u0446\u0443\u044e\u0449\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a&quot;. \u0417\u0430\u043e\u0434\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0433\u0434\u0435 \u0438 \u0437\u0430\u0447\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0432 Julia \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0430 \u0433\u0434\u0435 \u043e\u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304586","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304586","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=304586"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304586\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}