{"id":304544,"date":"2020-05-30T15:00:21","date_gmt":"2020-05-30T15:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304544"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304544","title":{"rendered":"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435"},"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\/504598\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zd\/6i\/ot\/zd6iot54oxpybjjvtfpznmgymem.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e, \u2013 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B5%D1%88%D0%B5%D1%82%D0%BE_%D0%AD%D1%80%D0%B0%D1%82%D0%BE%D1%81%D1%84%D0%B5%D0%BD%D0%B0\">\u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430<\/a>. \u041e\u043d \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432, \u0435\u0441\u043b\u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u0436\u0434\u044b\u0439, \u043a\u0442\u043e \u043b\u044e\u0431\u0438\u0442 \u0440\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u041a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u043c\u043d\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u0445\u0430\u043a\u0435\u0440\u0440\u0430\u043d\u043a\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c in-memory \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432. \u041f\u0440\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432 \u0440\u0435\u0448\u0435\u0442\u0435 \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0431\u0438\u0442\u043e\u0432\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 6 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, \u0447\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0435\u0433\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u043d\u0435 \u0432\u043b\u0435\u0437\u0430\u043b\u043e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u0435\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 (\u0434\u0435\u043b\u044f\u0449\u0430\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0438\u0441\u0435\u043b \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0441\u043a\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u0443\u0441\u043a\u0443 \u0437\u0430 \u0440\u0430\u0437) \u2013 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B5%D1%88%D0%B5%D1%82%D0%BE_%D0%AD%D1%80%D0%B0%D1%82%D0%BE%D1%81%D1%84%D0%B5%D0%BD%D0%B0#%D0%A1%D0%B5%D0%B3%D0%BC%D0%B5%D0%BD%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D1%80%D0%B5%D1%88%D0%B5%D1%82%D0%BE\">\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430<\/a>, \u043d\u043e \u043e\u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u0435\u0442. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043a\u0430\u043a \u0438 \u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430, \u043d\u043e \u0434\u0430\u044e\u0449\u0438\u0439 \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 (\u0442\u043e \u0435\u0441\u0442\u044c, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u043a\u043e\u043b\u043e 3 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, \u0447\u0442\u043e \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043b\u0435\u0437\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430).<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430: \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0447\u0438\u0441\u0435\u043b \u043e\u0442 1 \u0434\u043e N \u0432\u044b\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0430, \u0434\u0435\u043b\u044f\u0449\u0438\u0435\u0441\u044f \u043d\u0430 \u0434\u0432\u0430, \u043f\u043e\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430, \u0434\u0435\u043b\u044f\u0449\u0438\u0435\u0441\u044f \u043d\u0430 3, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438:<\/p>\n<pre><code class=\"plaintext\">2 3 . 5 . 7 . 9 . 11 . 13 . 15 . 17 . 19 . 21 . 23 . 25 . 27  . 29  ... 2 3 . 5 . 7 . . . 11 . 13 .  . . 17 . 19 .  . . 23 . 25 .  .  . 29  ... 2 3 . 5 . 7 . . . 11 . 13 .  . . 17 . 19 .  . . 23 .  . .  .  . 29  ... <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 \u043d\u0430 c#<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">class EratospheneSieve {     private bool[] Data;      public EratospheneSieve(int length)     {         Data = new bool[length];          for (int i = 2; i &lt; Data.Length; i++) Data[i] = true;          for (int i = 2; i * i &lt; Length; i++)         {             if (!Data[i]) continue;             for (int d = i * i; d &lt; Length; d += i) Data[d] = false;         }     }      public int Length =&gt; Data.Length;      public bool IsPrime(int n) =&gt; Data[n]; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041d\u0430 \u043c\u043e\u0435\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0434\u043e \u043c\u0438\u043b\u043b\u0438\u0440\u0430\u0440\u0434\u0430 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wheel_factorization\">Wheel Factorization<\/a>. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0441\u0443\u0442\u044c, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u043e\u0439 \u043f\u043e 30 \u0448\u0442\u0443\u043a \u0432 \u0440\u044f\u0434:<\/p>\n<pre><code class=\"plaintext\"> 0  1  2  3  4  5 ... 26 27 28 29 30 31 32 33 34 35 ... 56 57 58 59 60 61 62 63 64 65 ... 86 87 88 89 ... <\/code><\/pre>\n<p>  \u0418 \u0432\u044b\u0447\u0435\u0440\u043a\u043d\u0435\u043c \u0432\u0441\u0435 \u0447\u0438\u0441\u043b\u0430, \u0434\u0435\u043b\u044f\u0449\u0438\u0435\u0441\u044f \u043d\u0430 2, 3, \u0438 5:<\/p>\n<pre><code class=\"cs\">.  1 . . . . .  7 . . . 11 . 13 . . . 17 . 19 . . . 23 . . . . . 29 . 31 . . . . . 37 . . . 41 . 43 . . . 47 . 49 . . . 53 . . . . . 59 . 61 . . . . . 67 . . . 71 . 73 . . . 77 . 79 . . . 83 . . . . . 89 ... <\/code><\/pre>\n<p>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u044f\u0434\u0443 \u0432\u044b\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u0445. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0432\u044b\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0447\u0438\u0441\u0435\u043b 2, 3, 5), \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u0435\u0432\u044b\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u0445. <\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u044f\u0434\u0443 \u0442\u0430\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u0432\u043e\u0441\u0435\u043c\u044c, \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0438\u0434\u0435\u044e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043a\u0443 \u0447\u0438\u0441\u0435\u043b \u043e\u0434\u043d\u0438\u043c \u0431\u0430\u0439\u0442\u043e\u043c, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0432\u043e\u0441\u044c\u043c\u0438 \u0431\u0438\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u042d\u0442\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0441\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043d\u043e \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sc\/kk\/_9\/sckk_9guzbjn14nmzo7djdiyvxm.png\" alt=\"image\"\/><\/p>\n<h4>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2013 \u0434\u043e\u0439\u0442\u0438 \u0434\u043e \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0431\u0430\u0439\u0442\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0443\u0436\u0435 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">class Wheel235 {     private byte[] Data;      public Wheel235(long length)     {         ...     }     public bool IsPrime(long n)     {         ...     }     ... } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0431\u0443\u0434\u0435\u043c \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c length \u0432\u0432\u0435\u0440\u0445 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0434\u0435\u043b\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043d\u0430 30. \u0422\u043e\u0433\u0434\u0430<\/p>\n<pre><code class=\"cs\">class Wheel235 {     private byte[] Data;      public Wheel235(long length)     {         \/\/ ensure length divides by 30         length = (length + 29) \/ 30 * 30;          Data = new byte[length\/30];         ...     }      public long Length =&gt; Data.Length * 30L;      ... } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0432\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430: \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 0..29 \u0432 \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u0442\u0430, \u0432\u0442\u043e\u0440\u043e\u0439, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u0442\u0430 \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043a\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u043e\u0432\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438, \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0438 \u0431\u0438\u0442\u0430\u043c\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 Data. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430: IsPrime(n), \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0443\u0437\u043d\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0438 ClearPrime(n), \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0431\u0438\u0442 \u0432 0, \u043c\u0430\u0440\u043a\u0438\u0440\u0443\u044f \u0447\u0438\u0441\u043b\u043e n \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0435:<\/p>\n<pre><code class=\"cs\">class Wheel235 {     private static int[] BIT_TO_INDEX = new int[] { 1, 7, 11, 13, 17, 19, 23, 29 };      private static int[] INDEX_TO_BIT = new int[] {         -1, 0,         -1, -1, -1, -1, -1, 1,         -1, -1, -1, 2,         -1, 3,         -1, -1, -1, 4,         -1, 5,         -1, -1, -1, 6,         -1, -1, -1, -1, -1, 7,     };      private byte[] Data;      ...      public bool IsPrime(long n)     {         if (n &lt;= 5) return n == 2 || n == 3 || n == 5;         int bit = INDEX_TO_BIT[n % 30];         if (bit &lt; 0) return false;         return (Data[n \/ 30] & (1 &lt;&lt; bit)) != 0;     }      private void ClearPrime(long n)     {         int bit = INDEX_TO_BIT[n % 30];         if (bit &lt; 0) return;         Data[n \/ 30] &= (byte)~(1 &lt;&lt; bit);     } } <\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 2, 3 \u0438\u043b\u0438 5, \u0442\u043e \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 -1, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0435. \u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 n &lt;= 5.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430:<\/p>\n<pre><code class=\"cs\">    public Wheel235(long length)     {         length = (length + 29) \/ 30 * 30;         Data = new byte[length \/ 30];         for (long i = 0; i &lt; Data.Length; i++) Data[i] = byte.MaxValue;          for (long i = 7; i * i &lt; Length; i++)         {             if (!IsPrime(i)) continue;             for (long d = i * i; d &lt; Length; d += i) ClearPrime(d);         }     } <\/code><\/pre>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043a\u043b\u0430\u0441\u0441:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">class Wheel235 {     private static int[] BIT_TO_INDEX = new int[] { 1, 7, 11, 13, 17, 19, 23, 29 };      private static int[] INDEX_TO_BIT = new int[] {         -1, 0,         -1, -1, -1, -1, -1, 1,         -1, -1, -1, 2,         -1, 3,         -1, -1, -1, 4,         -1, 5,         -1, -1, -1, 6,         -1, -1, -1, -1, -1, 7,     };      private byte[] Data;      public Wheel235(long length)     {         \/\/ ensure length divides by 30         length = (length + 29) \/ 30 * 30;         Data = new byte[length \/ 30];         for (long i = 0; i &lt; Data.Length; i++) Data[i] = byte.MaxValue;          for (long i = 7; i * i &lt; Length; i++)         {             if (!IsPrime(i)) continue;             for (long d = i * i; d &lt; Length; d += i) ClearPrime(d);         }     }      public long Length =&gt; Data.Length * 30L;      public bool IsPrime(long n)     {         if (n &gt;= Length) throw new ArgumentException(&quot;Number too big&quot;);         if (n &lt;= 5) return n == 2 || n == 3 || n == 5;         int bit = INDEX_TO_BIT[n % 30];         if (bit &lt; 0) return false;         return (Data[n \/ 30] & (1 &lt;&lt; bit)) != 0;     }      private void ClearPrime(long n)     {         int bit = INDEX_TO_BIT[n % 30];         if (bit &lt; 0) return;         Data[n \/ 30] &= (byte)~(1 &lt;&lt; bit);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0415\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043a\u0430: \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b, \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 65 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432! \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0435\u0451 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/p>\n<pre><code class=\"plaintext\">Unhandled Exception: System.OverflowException: Array dimensions exceeded supported range. <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 c# \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 2^31 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u0432\u0438\u0434\u0438\u043c\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0431\u0430\u0439\u0442\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430). \u041e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u2013 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 byte[] \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u0441\u0441\u0438\u0432 long[], \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442 \u0431\u0438\u0442\u043e\u0432\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0435\u043c, \u0441\u043e\u0437\u0434\u0430\u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0432\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u0417\u0430\u043e\u0434\u043d\u043e \u043c\u044b \u0435\u043c\u0443 \u0434\u0430\u0434\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u0435\u0431\u044f \u043d\u0430 \u0434\u0438\u0441\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0430\u0437\u043e\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e:<\/p>\n<pre><code class=\"cs\">    class LongArray     {         const long MAX_CHUNK_LENGTH = 2_000_000_000L;         private byte[] firstBuffer;         private byte[] secondBuffer;          public LongArray(long length)         {             firstBuffer = new byte[Math.Min(MAX_CHUNK_LENGTH, length)];             if (length &gt; MAX_CHUNK_LENGTH) secondBuffer = new byte[length - MAX_CHUNK_LENGTH];         }          public LongArray(string file)         {             ...         }          public long Length =&gt; firstBuffer.LongLength + (secondBuffer == null ? 0 : secondBuffer.LongLength);          public byte this[long index]         {             get =&gt; index &lt; MAX_CHUNK_LENGTH ? firstBuffer[index] : secondBuffer[index - MAX_CHUNK_LENGTH];             set             {                 if (index &lt; MAX_CHUNK_LENGTH) firstBuffer[index] = value;                  else secondBuffer[index - MAX_CHUNK_LENGTH] = value;             }         }          public void Save(string file)         {             ...         }      }  <\/code><\/pre>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043c \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u0432<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">class Wheel235 {     class LongArray     {         const long MAX_CHUNK_LENGTH = 2_000_000_000L;         private byte[] firstBuffer;         private byte[] secondBuffer;          public LongArray(long length)         {             firstBuffer = new byte[Math.Min(MAX_CHUNK_LENGTH, length)];             if (length &gt; MAX_CHUNK_LENGTH) secondBuffer = new byte[length - MAX_CHUNK_LENGTH];         }          public LongArray(string file)         {             using(FileStream stream = File.OpenRead(file))             {                 long length = stream.Length;                 firstBuffer = new byte[Math.Min(MAX_CHUNK_LENGTH, length)];                 if (length &gt; MAX_CHUNK_LENGTH) secondBuffer = new byte[length - MAX_CHUNK_LENGTH];                 stream.Read(firstBuffer, 0, firstBuffer.Length);                 if(secondBuffer != null) stream.Read(secondBuffer, 0, secondBuffer.Length);             }         }          public long Length =&gt; firstBuffer.LongLength + (secondBuffer == null ? 0 : secondBuffer.LongLength);          public byte this[long index]         {             get =&gt; index &lt; MAX_CHUNK_LENGTH ? firstBuffer[index] : secondBuffer[index - MAX_CHUNK_LENGTH];             set             {                 if (index &lt; MAX_CHUNK_LENGTH) firstBuffer[index] = value;                  else secondBuffer[index - MAX_CHUNK_LENGTH] = value;             }         }          public void Save(string file)         {             using(FileStream stream = File.OpenWrite(file))             {                 stream.Write(firstBuffer, 0, firstBuffer.Length);                 if (secondBuffer != null) stream.Write(secondBuffer, 0, secondBuffer.Length);             }         }      }      private static int[] BIT_TO_INDEX = new int[] { 1, 7, 11, 13, 17, 19, 23, 29 };      private static int[] INDEX_TO_BIT = new int[] {         -1, 0,         -1, -1, -1, -1, -1, 1,         -1, -1, -1, 2,         -1, 3,         -1, -1, -1, 4,         -1, 5,         -1, -1, -1, 6,         -1, -1, -1, -1, -1, 7,     };      private LongArray Data;      public Wheel235(long length)     {         \/\/ ensure length divides by 30         length = (length + 29) \/ 30 * 30;         Data = new LongArray(length \/ 30);         for (long i = 0; i &lt; Data.Length; i++) Data[i] = byte.MaxValue;          for (long i = 7; i * i &lt; Length; i++)         {             if (!IsPrime(i)) continue;             for (long d = i * i; d &lt; Length; d += i) ClearPrime(d);         }     }      public Wheel235(string file)     {         Data = new LongArray(file);     }      public void Save(string file) =&gt; Data.Save(file);      public long Length =&gt; Data.Length * 30L;      public bool IsPrime(long n)     {         if (n &gt;= Length) throw new ArgumentException(&quot;Number too big&quot;);         if (n &lt;= 5) return n == 2 || n == 3 || n == 5;         int bit = INDEX_TO_BIT[n % 30];         if (bit &lt; 0) return false;         return (Data[n \/ 30] & (1 &lt;&lt; bit)) != 0;     }      private void ClearPrime(long n)     {         int bit = INDEX_TO_BIT[n % 30];         if (bit &lt; 0) return;         Data[n \/ 30] &= (byte)~(1 &lt;&lt; bit);     }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043d\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b 50 \u043c\u0438\u043d\u0443\u0442; \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 3 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430, \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c):<\/p>\n<pre><code class=\"cs\">        long N = 100_000_000_000L;         Wheel235 wheel = new Wheel235(N);         wheel.Save(&quot;.\/primes.dat&quot;); <\/code><\/pre>\n<p>  \u0410 \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u0434\u0438\u0441\u043a\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"cs\">        DateTime start = DateTime.UtcNow;         Wheel235 loaded = new Wheel235(&quot;.\/primes.dat&quot;);         DateTime end = DateTime.UtcNow;         Console.WriteLine($&quot;Database of prime numbers up to {loaded.Length:N0} loaded from file to memory  in {end - start}&quot;);         long number = 98_000_000_093L;         Console.WriteLine($&quot;{number:N0} is {(loaded.IsPrime(number) ? &quot;prime&quot; : &quot;not prime&quot;)}!&quot;); <\/code><\/pre>\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\/504598\/\"> https:\/\/habr.com\/ru\/post\/504598\/<\/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\/504598\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zd\/6i\/ot\/zd6iot54oxpybjjvtfpznmgymem.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e, \u2013 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B5%D1%88%D0%B5%D1%82%D0%BE_%D0%AD%D1%80%D0%B0%D1%82%D0%BE%D1%81%D1%84%D0%B5%D0%BD%D0%B0\">\u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430<\/a>. \u041e\u043d \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432, \u0435\u0441\u043b\u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u0436\u0434\u044b\u0439, \u043a\u0442\u043e \u043b\u044e\u0431\u0438\u0442 \u0440\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u041a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u043c\u043d\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 \u0445\u0430\u043a\u0435\u0440\u0440\u0430\u043d\u043a\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c in-memory \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432. \u041f\u0440\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432 \u0440\u0435\u0448\u0435\u0442\u0435 \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0431\u0438\u0442\u043e\u0432\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 6 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, \u0447\u0442\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0435\u0433\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430 \u043d\u0435 \u0432\u043b\u0435\u0437\u0430\u043b\u043e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u0435\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 (\u0434\u0435\u043b\u044f\u0449\u0430\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0438\u0441\u0435\u043b \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0441\u043a\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u0443\u0441\u043a\u0443 \u0437\u0430 \u0440\u0430\u0437) \u2013 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B5%D1%88%D0%B5%D1%82%D0%BE_%D0%AD%D1%80%D0%B0%D1%82%D0%BE%D1%81%D1%84%D0%B5%D0%BD%D0%B0#%D0%A1%D0%B5%D0%B3%D0%BC%D0%B5%D0%BD%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D1%80%D0%B5%D1%88%D0%B5%D1%82%D0%BE\">\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430<\/a>, \u043d\u043e \u043e\u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u0435\u0442. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0447\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043a\u0430\u043a \u0438 \u0440\u0435\u0448\u0435\u0442\u043e \u042d\u0440\u0430\u0442\u043e\u0441\u0444\u0435\u043d\u0430, \u043d\u043e \u0434\u0430\u044e\u0449\u0438\u0439 \u0434\u0432\u0443\u043a\u0440\u0430\u0442\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 (\u0442\u043e \u0435\u0441\u0442\u044c, \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e \u0441\u0442\u0430 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u043a\u043e\u043b\u043e 3 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442, \u0447\u0442\u043e \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043b\u0435\u0437\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430).  <\/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-304544","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304544","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=304544"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304544\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}