{"id":311214,"date":"2020-10-09T15:00:18","date_gmt":"2020-10-09T15:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311214"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-10-09T15:00:18","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311214","title":{"rendered":"\u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e 2 \u0437\u0430 O(1)"},"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\/522788\/\">\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e 2 \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. <\/p>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u0431 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0438 \u0432 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u0434\u0432\u0430, \u043f\u043e\u043a\u0430 \u043e\u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u0442\u0430\u043a\u043e\u0432\u043e \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430. \u0414\u0430, \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0446\u0438\u043a\u043b\u043e\u0432 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443:  <\/p>\n<p><math>$$display$$y = [log_2(x)], x &#8212; \u0446\u0435\u043b\u043e\u0435, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435$$display$$<\/math><\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u044f \u0434\u0430\u043c \u0441\u0440\u0430\u0437\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430:<\/p>\n<pre><code class=\"cpp\">uint32_t getHighBit_32(uint32_t x) {     x |= x &gt;&gt; 1;     x |= x &gt;&gt; 2;     x |= x &gt;&gt; 4;     x |= x &gt;&gt; 8;     x |= x &gt;&gt; 16;     return x - (x &gt;&gt; 1); }  uint32_t getBitCount_32(uint32_t x) { \tx = (x & 0x55555555) + ((x &gt;&gt; 1) & 0x55555555); \tx = (x & 0x33333333) + ((x &gt;&gt; 2) & 0x33333333); \tx = (x & 0x0F0F0F0F) + ((x &gt;&gt; 4) & 0x0F0F0F0F); \tx = (x & 0x00FF00FF) + ((x &gt;&gt; 8) & 0x00FF00FF); \treturn (x & 0x0000FFFF) + (x &gt;&gt; 16); }  uint32_t getLog2_32(uint32_t x) {     return getBitCount_32(getHighBit_32(x) - 1); } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0447\u0438\u0441\u043b\u043e x \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u0438\u043d\u044b = 8, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0438 \u0434\u043b\u0438\u043d\u0430 \u0447\u0438\u0441\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439.<\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u043d\u0430 \u0447\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c. \u041d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0432 \u0432\u0438\u0434\u0435 \u0441\u0443\u043c\u043c\u044b \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0434\u0432\u043e\u0439\u043a\u0438. \u041d\u043e\u043c\u0435\u0440 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0431\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0432\u0435\u043d 1. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <math>$inline$45 = 32 + 8 + 4 + 1 = 2^5 + 2^3 + 2^2 + 2^0$inline$<\/math>. \u0422.\u0435. \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 5, 3, 2 \u0438 0. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e 5-\u044b\u0439, 3-\u0438\u0439, 2-\u043e\u0439, 0-\u043e\u0439 \u0431\u0438\u0442\u044b \u0440\u0430\u0432\u0435\u043d 1. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0440\u0430\u0432\u043d\u044b \u043d\u0443\u043b\u044e. \u041e\u0442\u0441\u0447\u0435\u0442 \u0431\u0438\u0442\u043e\u0432 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e <math>$inline$45_{10} = 101101_2$inline$<\/math><\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0442\u0435\u0441\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c, \u0430 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u044d\u0442\u043e \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0438 \u0440\u0430\u0432\u043d\u0430 \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u0438.  <\/p>\n<p><math>$$display$$2^y = x, y = log_2(x)$$display$$<\/math><\/p>\n<p>  \u041f\u0440\u0438\u0442\u043e\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0437\u0432\u0435\u0441\u0442\u0438 2, \u044d\u0442\u043e \u043d\u043e\u043c\u0435\u0440 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u043c\u0435\u0440 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0446\u0435\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e \u0434\u0432\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 32 = 100000, \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 5 \u043c\u0435\u0441\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0440\u0430\u0432\u0435\u043d 5. <\/p>\n<p>  \u041d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 1, \u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0442\u043e \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u043a\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u0431\u0440\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c. \u041e\u0442\u0432\u0435\u0442 \u2014 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442\u0441\u0447\u0435\u0442 \u0441 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u0440\u0448\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0432\u043e\u0439\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0446\u0435\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0447\u0438\u0441\u043b\u043e <math>$inline$45_{10} = 101101_2$inline$<\/math>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 5 \u043c\u0435\u0441\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0446\u0435\u043b\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u043e\u0442 45 \u0440\u0430\u0432\u043d\u0430 5. \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e <math>$inline$log_2(45)=5.4919$inline$<\/math>. \u0414\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043c\u044b \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u0438 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f 5.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438, \u0447\u0442\u043e \u0446\u0435\u043b\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u0430. \u0412\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430?<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043d\u0430\u0448\u0435\u043b \u0432 \u043a\u043d\u0438\u0436\u043a\u0435 \u0413.\u0423\u043e\u0440\u0440\u0435\u043d\u0430 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0440\u044e\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432\u00bb.<\/p>\n<ul>\n<li>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0434\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u0432\u043e\u0439\u043a\u0438 \u0432 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 (\u0438\u043b\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0438\u0441\u043b\u0430). \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c \u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443.<\/li>\n<li>\u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0447\u0438\u0441\u043b\u0430<\/li>\n<\/ul>\n<p>  \u041e\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0442\u0430\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u044b, \u0430 \u0438\u0445 \u043a\u043e\u0434 \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u0440\u0430\u043d\u0435\u0435. <\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0438 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442 \u0432 \u0447\u0438\u0441\u043b\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0430\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 100000<\/li>\n<li>\u0412\u044b\u0447\u0435\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u0422\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u0430\u043a\u0438\u043c: 011111<\/li>\n<li>\u041f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430<\/li>\n<\/ol>\n<p>  <\/p>\n<h3>\u0418\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u0423 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u0435\u0441\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 x = 0. \u041f\u043e \u0438\u0434\u0435\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 (\u0438\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0435 \u043e\u043d \u0440\u0430\u0432\u0435\u043d -\u221e). \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u0437\u0430\u043a\u043e\u043d\u043e\u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u043b\u044c. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e 32 (\u0435\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e 32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0435). \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u0432\u043e\u0439\u043a\u0438 \u0432\u044b\u0434\u0430\u0441\u0442 0, \u043f\u043e\u0442\u043e\u043c \u043c\u044b \u0438\u0437 \u043d\u0443\u043b\u044f \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e 0xFFFFFFFF, \u0430 \u0435\u0434\u0438\u043d\u0438\u0446 \u0432 \u0442\u0430\u043a\u043e\u043c \u0447\u0438\u0441\u043b\u0435 32 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c \u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 32.<\/p>\n<p>  \u0414\u0430, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043d\u043e \u0435\u0441\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h2>\u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u0434\u043b\u0438\u043d\u044b \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/h2>\n<p>  \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u0440\u044f\u0434 \u043b\u0438 \u0441\u0442\u0430\u043d\u0443\u0442 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0447\u0430\u0449\u0435 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u044b \u043e\u0442 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0430 \u043d\u0435 \u0446\u0435\u043b\u044b\u0445.<br \/>  \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0434\u043b\u0438\u043d\u044b \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0447\u0430\u0449\u0435.<\/p>\n<p>  \u041f\u0443\u0441\u0442\u044c \u0434\u0430\u043d \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0443\u0442\u044c \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438 \u043a\u043e\u0434\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0432\u0437\u044f\u0442\u0438\u0435 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u043d \u043a\u043e\u0434 0001110110. \u041e\u043d \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u044f\u0447\u0435\u0439\u043a\u0443 \u0438\u0437 32 \u0431\u0438\u0442 \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u0434\u043e\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c: 10001110110. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0441\u043c\u0435\u043b\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c, \u043d\u0435 \u0445\u0440\u0430\u043d\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u0438\u043d\u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0433\u0434\u0435-\u0442\u043e \u0435\u0449\u0435.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u043a\u043e\u0434\u0430, \u0433\u0434\u0435 \u0432\u0441\u0435 \u043d\u0443\u043b\u0438, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0430\u0441\u0442 \u0434\u043b\u0438\u043d\u0443 = 32, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043d\u0430\u0434\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c. \u0412 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0430 32, \u0430 \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u043e\u043b\u044c.<\/p>\n<h2>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n<p>  <\/p>\n<ol>\n<li>\u0413. \u0423\u043e\u0440\u0440\u0435\u043d \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0440\u044e\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0437\u0434\u0430\u043d\u0438\u0435.\u00bb, 2004<\/li>\n<\/ol>\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\/522788\/\"> https:\/\/habr.com\/ru\/post\/522788\/<\/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\/522788\/\">\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e 2 \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. <\/p>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u0431 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0438 \u0432 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u0434\u0432\u0430, \u043f\u043e\u043a\u0430 \u043e\u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u0442\u0430\u043a\u043e\u0432\u043e \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0430. \u0414\u0430, \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0446\u0438\u043a\u043b\u043e\u0432 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439.  <\/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-311214","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311214","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=311214"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311214\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}