{"id":446252,"date":"2025-01-27T09:02:36","date_gmt":"2025-01-27T09:02:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=446252"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=446252","title":{"rendered":"<span>\u041e\u0442\u0447\u0435\u0442 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 SAPT<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/7ae\/485\/471\/7ae4854719a6468382bd7a40ff41631e.jpg\" alt=\"\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f SAPT Adobe Photoshop\" title=\"\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f SAPT Adobe Photoshop\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ae\/485\/471\/7ae4854719a6468382bd7a40ff41631e.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f SAPT <sub>Adobe Photoshop<\/sub><\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u0447\u0435\u0442 \u043e, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043c\u043d\u043e\u044e, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u043c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435, \u0438\u043c\u0435\u044e\u0449\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/527\/fb3\/24f\/527fb324ff1fae09372ff809dc36f33f.svg\" width=\"39\" height=\"22\"\/> \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c. \u041d\u0435 \u0441\u0447\u0438\u0442\u0430\u044e \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0447\u0435\u043c-\u0442\u043e \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u043c\u0441\u044f, \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0442\u0447\u0435\u0442 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u044f:<br \/>\u0417\u0430\u0447\u0435\u043c \u044f \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0434\u0435\u0440\u0435\u0432\u043e?<\/p>\n<p>\u042f \u043f\u0438\u0448\u0443 \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u0441\u0444\u0435\u0440\u044b \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430\u043c, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u043a\u043b\u0435\u0442\u043a\u0430\u043c\u0438, \u0430 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e &#171;\u0441\u0442\u0430\u0440\u043e\u0441\u0442\u044c\u044e&#187; \u043a\u043b\u0435\u0442\u043e\u043a.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> <strong>\u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/strong><\/p>\n<h2>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/h2>\n<p>\u0421\u0430\u043c\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0435\u0440\u0435\u0432\u0430 <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr>(Static Abstract Priority Tree) \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c, \u0430 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0445\u043e\u0442\u044c \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<p> \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c <code>std::vector<\/code>(\u0438\u043b\u0438 <code>std::array<\/code>, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e), \u0433\u0434\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u043c(\u0440\u044f\u0434\u043e\u043c) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u0437\u043b\u044b \u0432 \u0432\u0438\u0434\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043d\u0438\u0436\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439.<\/p>\n<p>\u0418\u043c\u0435\u0435\u0442 6 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, 2 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 (\u0441 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c Mini) \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0442\u0440\u0430\u0442 \u043f\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445, \u044f \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u043e\u0434-\u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438. \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043e\u0431\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 \u0433\u043e\u0440\u0431 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>Mini \u043a\u043e\u043d\u0446\u0435\u043f\u0442 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c)<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 Mini \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043d\u0430 &#8212; 16 \u0431\u0438\u0442 || 2 \u0431\u0430\u0439\u0442\u0430, \u0432\u043c\u0435\u0441\u0442\u043e 32 \u0431\u0438\u0442 || 4 \u0431\u0430\u0439\u0442 \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u0445. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0445 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<br \/> \u041d\u0443 \u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr> \u0441\u0430\u043c \u0440\u0435\u0448\u0430\u0435\u0442 \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e-\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u0435 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<\/p>\n<h3>\u041e\u0431\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439<\/h3>\n<p> \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 (\u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c) \u043d\u0430 \u0441\u0432\u043e\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435. \u0422\u0430\u043a\u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0439 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0435\u0442\u0435\u0439, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 &#8212; \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr>. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438\\\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p><em>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/em><\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c Memory               || 8 \u0431\u0430\u0439\u0442<br \/>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u043b\u0435\u0442\u043a\u0438 (<code>cell_y<\/code>, <code>cell_x<\/code>), \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439 (<code>childCount<\/code> &#8212; \u0447\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u0432\u0441\u0435 {<code>childCount<\/code>} \u0434\u0435\u0442\u0438 \u0438\u0434\u0443\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c BalanceMemory  || 12 \u0431\u0430\u0439\u0442<br \/>\u0412\u0441\u0435 \u0435\u0449\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439, \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430 (<code>children<\/code>). \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (<code>fragmentIndexBy<\/code>), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u0431\u0435\u043d\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c BalanceSpeed    || 24 \u0431\u0430\u0439\u0442<br \/>\u0412\u043c\u0435\u0441\u0442\u043e \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043a\u043b\u0435\u0442\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0435\u0435 (<code>*cell<\/code>).<br \/>\u0422\u0430\u043a\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f <code>parent<\/code> \u0438 \u0435\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 <code>parentFragmentIndexBy;<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c Speed                 || 32 \u0431\u0430\u0439\u0442\u0430<br \/>\u0425\u0440\u0430\u043d\u0438\u0442 \u0438\u043d\u0434\u0435\u043a\u0441, \u0438 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0443\u0440\u043e\u0432\u043d\u044f. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u0440\u0435\u0447\u044c\u0441\u044f \u043e\u0442 <code>childCount<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438:<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: Balance &#171;\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442&#187; \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0435\u0442\u043a\u0438 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u0440\u0443\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, BalanceMemory \u043e\u0442 Memory, BalanceSpeed \u043e\u0442 Speed. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 BalanceSpeed \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d (\u0435\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0435\u0442\u043a\u0438).<\/em><\/p>\n<ul>\n<li>\n<p>Memory<br \/>\u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b.<br \/>\u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0435\u0442\u0435\u0439 \u0431\u0435\u0440\u0435\u0442 <code>childCount<\/code> \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432 \u0443\u0440\u043e\u0432\u043d\u0435 &#8212; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0434\u0432\u0438\u0433 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430. \u0412 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>BalanceMemory<br \/>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0434\u0435\u0442\u0435\u0439 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0434\u0432\u0438\u0433 (<code>children<\/code>), \u0438 \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439 (<code>childCount<\/code>), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0443\u0436\u0438\u0445 \u0434\u0435\u0442\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>Speed<br \/>\u0418\u043c\u0435\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0443, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0438\u0433\u0440\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e.<br \/>\u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0435\u0442\u0435\u0439 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u0435\u0442\u0435\u0439, \u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0438\u0432\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u043b\u0438\u0448\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<br \/>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 (<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b32\/6f3\/58c\/b326f358c790fb3011d8c0ea4c57baee.svg\" width=\"39\" height=\"22\"\/> \u0437\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 <abbr class=\"habraabbr\" title=\"\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u0440\u0435\u0431\u0440\u043e \u043e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043a \u0440\u0435\u0431\u0435\u043d\u043a\u0443\" data-title=\"&lt;p&gt;\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u0440\u0435\u0431\u0440\u043e \u043e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043a \u0440\u0435\u0431\u0435\u043d\u043a\u0443&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"\u0440\u0435\u0431\u0440\u043e\">\u0440\u0435\u0431\u0440\u043e*<\/abbr>), \u043b\u0438\u0431\u043e \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(N)\" alt=\"O(N)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e35\/125\/cf4\/e35125cf4bd2c72389353ee13cbeb0a4.svg\" width=\"47\" height=\"22\"\/> \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432). \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0431\u0440\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u0432 \u0434\u0435\u0440\u0435\u0432\u0435, \u0438 \u0434\u0435\u0442\u044c\u043c\u0438.<br \/><em>\u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0435<\/em><\/p>\n<\/li>\n<\/ul>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h3>\n<p> \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430, \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441.<br \/> \u0411\u0435\u0437 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0434\u043b\u044f \u0442\u0438\u043f\u0430 <code>uint32_t<\/code> \u0431\u044b\u043b \u0431\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"4,294,967,295\" alt=\"4,294,967,295\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e3c\/0a5\/4c2\/e3c0a54c2f044bde80a89339f1a967c2.svg\" width=\"122\" height=\"20\"\/> (4,3 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430) \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044c Memory (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0442, \u0438\u0431\u043e \u0441\u0430\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0430\u043c \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f).<br \/> \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439, \u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"maxNum * 256 = 1,099,511,627,520\" alt=\"maxNum * 256 = 1,099,511,627,520\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa9\/887\/896\/aa9887896e12c947c2d77e13d9f8b9b5.svg\" width=\"316\" height=\"20\"\/> (1,1 \u0442\u0440\u0438\u043b\u043b\u0438\u043e\u043d) \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432!  <em>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u041e\u0417\u0423<br \/>\u041a\u0441\u0442\u0430\u0442\u0438 \u043f\u0440\u0438 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 cache locality.<\/em><\/p>\n<p> \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430, \u0432\u0435\u0434\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u0440\u044f\u0434-\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e \u0438 30-40 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432, \u0447\u0435\u0433\u043e \u0443\u0436 \u0442\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u0445 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u044d\u0442\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0440\u043d\u044b\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043d\u0430 \u044d\u0442\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0435\u0440\u044f\u0435\u043c, \u0432\u0435\u0434\u044c \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (1-4 \u0431\u0430\u0439\u0442) \u0438 \u0442\u0430\u043a \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u043e\u0441\u044c \u0431\u044b, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0430 \u0437\u0430\u043c\u0435\u0441\u0442\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 SAPT \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0430?<\/h2>\n<p> \u0412\u0435\u0441\u044c \u0441\u0435\u043a\u0440\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 (\u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 Speed) \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438:<br \/><abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr> \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u0443 <code>std::vector<\/code> \u0438\u043b\u0438 <code>std::array<\/code> \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<br \/>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0430\u043c\u043e\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430.<br \/>\u0422\u043e \u0435\u0441\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<p>\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \\ \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (\u0430\u043c\u043e\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435)    <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d95\/dea\/1cd\/d95dea1cdd05dea3b3490b28d62260a4.svg\" width=\"39\" height=\"22\"\/><br \/>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443                <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/71b\/f8e\/d2a\/71bf8ed2ad7d293d31c206e891ba9be5.svg\" width=\"39\" height=\"22\"\/><br \/><em>(\u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c)<\/em><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c:<br \/> \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 <code>current+1<\/code>.<br \/> \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/53c\/077\/bec\/53c077bec24b4d1490df625db030dcb6.svg\" width=\"39\" height=\"22\"\/>, \u0430 \u0442\u0430\u043a\u0436\u0435 &#171;\u0441\u0430\u043c\u043e\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430&#187;, \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0437\u043d\u0430\u0435\u043c \u043a\u0443\u0434\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0432:<\/p>\n<p>\u041f\u043e\u0438\u0441\u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \\ \u0440\u0435\u0431\u0435\u043d\u043a\u0430            <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/69a\/6e3\/31c\/69a6e331c1710dc4ed06dc69a1f128b2.svg\" width=\"39\" height=\"22\"\/><br \/>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430                               <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/982\/4dd\/3e8\/9824dd3e8aa7b7e959d32b2b9525dc99.svg\" width=\"39\" height=\"22\"\/><\/p>\n<p> \u0421 \u043f\u043e\u0438\u0441\u043a\u043e\u043c Min\\Max \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439, Min \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"0\" alt=\"0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce0\/ec8\/4df\/ce0ec84df02f80a798d8622f95ac33ae.svg\" width=\"10\" height=\"16\"\/> (\u0438\u0437-\u0437\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f), \u0430 Max \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043d\u0430\u0440\u0443\u0436\u043d\u043e\u0433\u043e <code>std::vector<\/code> \u0438\u043b\u0438 <code>std::array<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2e\/05e\/fd4\/d2e05efd4199d07a9a89102a800733b7.svg\" width=\"39\" height=\"22\"\/>.<\/p>\n<p> \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u0435\u0442\u0435\u0439 \u0441\u0442\u0430\u043b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u043e\u0439, \u0438 \u043e\u0442\u0434\u0435\u043b\u0438\u043b\u0441\u044f, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<br \/>\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0439\u043c\u0435\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(log N)\" alt=\"O(log N)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b7e\/fab\/432\/b7efab4329eadfd1234b2141a817625e.svg\" width=\"71\" height=\"22\"\/>, \u0433\u0434\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432 \u043e\u0447\u0438\u0441\u0442\u043a\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b-\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u041d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cd8\/1f9\/a3a\/cd81f9a3a1670d78a1614677d18eee15.svg\" width=\"39\" height=\"22\"\/> &#8212; \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043a\u043e\u043f\u0438\u0438 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr>.<\/p>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u044f \u0438\u0442\u043e\u0433\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \\ \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c9\/884\/4b6\/7c98844b627c78b56f5f30d89b3c2c29.svg\" width=\"39\" height=\"22\"\/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \\ \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \\ \u0440\u0435\u0431\u0435\u043d\u043a\u0430<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/690\/3b5\/57f\/6903b557fb8ef586403baa6932b456b9.svg\" width=\"39\" height=\"22\"\/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Min \\ Max<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/803\/5ef\/484\/8035ef484da1754e5b57c4b7ba00e527.svg\" width=\"39\" height=\"22\"\/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2e\/33a\/0ab\/d2e33a0ab9438b8ea89095e2adb597b4.svg\" width=\"39\" height=\"22\"\/> <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \\ \u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u043e\u0439<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\"><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ac\/e28\/a09\/8ace28a09d07daa78972a068678781f1.svg\" width=\"39\" height=\"22\"\/> \\ <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(log N)\" alt=\"O(log N)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cfc\/49b\/185\/cfc49b185e2f7376c2718a6aeb356102.svg\" width=\"71\" height=\"22\"\/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">struct Memory {     std::uint16_t cell_y;     std::uint16_t cell_x;      std::uint16_t priority;     std::uint8_t childCount; }; struct BalanceMemoryMini; \/\/ With uint16_t children       || -2 bytes struct BalanceMemory {     std::uint32_t children; \/\/ Index of first child        std::uint16_t cell_y;     std::uint16_t cell_x;     std::uint16_t priority;      std::uint8_t childCount;     std::uint8_t childrenFragmentIndexBy; }; struct BalanceSpeed {     std::uint32_t *cell;      std::uint32_t parent;     std::uint32_t children; \/\/ Index of first child     std::uint16_t priority;      std::uint8_t childCount;     std::uint8_t childrenFragmentIndexBy;     std::uint8_t parentFragmentIndexBy; }; struct SpeedMini; \/\/ With uint16_t children[3] &amp; parent   || -8 bytes struct Speed {     std::uint32_t children[3];     std::uint32_t parent;        std::uint32_t *cell;     std::uint16_t priority;        std::uint8_t childrenFragmentIndexBy[3];     std::uint8_t parentFragmentIndexBy; };  \/\/ Example \/\/ Massive with trees \\\/ \/\/ Every Tree is massive with levels \\\/ \/\/ Every Level is massive with profiles \\\/ std::vector&lt;std::vector&lt;std::vector&lt;Memory&gt;&gt;&gt; sapts; <\/code><\/pre>\n<p>\u042d\u0442\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0431\u0435\u0437 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<\/div>\n<\/details>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e, \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0438\u0431\u043a\u0443\u044e <u>\u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e<\/u> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"O(1)\" alt=\"O(1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ec\/f2b\/0ef\/7ecf2b0efc4a485f0687a8f16e77b1d1.svg\" width=\"39\" height=\"22\"\/>.<br \/>\u041d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u0443\u0448\u043b\u043e 5 \u0434\u043d\u0435\u0439, \u0438 \u0435\u0449\u0435 5 \u0434\u043d\u0435\u0439 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u0438\u0441\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435! <\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e \u0432\u0430\u0448\u0438\u0445 \u0438\u0434\u0435\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043b\u0438 \u0432\u0430\u043c \u0441\u0442\u0430\u0442\u044c\u044f, \u0438 \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 SAPT.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876878\/\"> https:\/\/habr.com\/ru\/articles\/876878\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f SAPT <sub>Adobe Photoshop<\/sub><\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0442\u0447\u0435\u0442 \u043e, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043c\u043d\u043e\u044e, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u043c \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435, \u0438\u043c\u0435\u044e\u0449\u0438\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c  \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c. \u041d\u0435 \u0441\u0447\u0438\u0442\u0430\u044e \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0447\u0435\u043c-\u0442\u043e \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u043c\u0441\u044f, \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0442\u0447\u0435\u0442 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u044f:<br \/>\u0417\u0430\u0447\u0435\u043c \u044f \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0434\u0435\u0440\u0435\u0432\u043e?<\/p>\n<p>\u042f \u043f\u0438\u0448\u0443 \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u0441\u0444\u0435\u0440\u044b \u0431\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430\u043c, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u043a\u043b\u0435\u0442\u043a\u0430\u043c\u0438, \u0430 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e &#171;\u0441\u0442\u0430\u0440\u043e\u0441\u0442\u044c\u044e&#187; \u043a\u043b\u0435\u0442\u043e\u043a.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong> <strong>\u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438.<\/strong><\/p>\n<h2>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/h2>\n<p>\u0421\u0430\u043c\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0435\u0440\u0435\u0432\u0430 <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr>(Static Abstract Priority Tree) \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0435\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c, \u0430 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0445\u043e\u0442\u044c \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<p> \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c <code>std::vector<\/code>(\u0438\u043b\u0438 <code>std::array<\/code>, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e), \u0433\u0434\u0435 \u0443\u0440\u043e\u0432\u043d\u0435\u043c(\u0440\u044f\u0434\u043e\u043c) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u0437\u043b\u044b \u0432 \u0432\u0438\u0434\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043d\u0438\u0436\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439.<\/p>\n<p>\u0418\u043c\u0435\u0435\u0442 6 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, 2 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 (\u0441 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c Mini) \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0442\u0440\u0430\u0442 \u043f\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445, \u044f \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u043f\u043e\u0434-\u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438. \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043e\u0431\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439, \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 \u0433\u043e\u0440\u0431 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>Mini \u043a\u043e\u043d\u0446\u0435\u043f\u0442 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c)<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 Mini \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043d\u0430 &#8212; 16 \u0431\u0438\u0442 || 2 \u0431\u0430\u0439\u0442\u0430, \u0432\u043c\u0435\u0441\u0442\u043e 32 \u0431\u0438\u0442 || 4 \u0431\u0430\u0439\u0442 \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u0445. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0445 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<br \/> \u041d\u0443 \u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u043d\u0438 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr> \u0441\u0430\u043c \u0440\u0435\u0448\u0430\u0435\u0442 \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e-\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u0435 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c.<\/p>\n<h3>\u041e\u0431\u0449\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439<\/h3>\n<p> \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 (\u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c) \u043d\u0430 \u0441\u0432\u043e\u044e \u043a\u043b\u0435\u0442\u043a\u0443 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435. \u0422\u0430\u043a\u0436\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0439 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0435\u0442\u0435\u0439, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 &#8212; \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr>. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438\\\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p><em>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/em><\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c Memory               || 8 \u0431\u0430\u0439\u0442<br \/>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u043b\u0435\u0442\u043a\u0438 (<code>cell_y<\/code>, <code>cell_x<\/code>), \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439 (<code>childCount<\/code> &#8212; \u0447\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u0432\u0441\u0435 {<code>childCount<\/code>} \u0434\u0435\u0442\u0438 \u0438\u0434\u0443\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c BalanceMemory  || 12 \u0431\u0430\u0439\u0442<br \/>\u0412\u0441\u0435 \u0435\u0449\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439, \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430 (<code>children<\/code>). \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (<code>fragmentIndexBy<\/code>), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u0431\u0435\u043d\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c BalanceSpeed    || 24 \u0431\u0430\u0439\u0442<br \/>\u0412\u043c\u0435\u0441\u0442\u043e \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043a\u043b\u0435\u0442\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0435\u0435 (<code>*cell<\/code>).<br \/>\u0422\u0430\u043a\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f <code>parent<\/code> \u0438 \u0435\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 <code>parentFragmentIndexBy;<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0444\u0438\u043b\u044c Speed                 || 32 \u0431\u0430\u0439\u0442\u0430<br \/>\u0425\u0440\u0430\u043d\u0438\u0442 \u0438\u043d\u0434\u0435\u043a\u0441, \u0438 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0443\u0440\u043e\u0432\u043d\u044f. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u0440\u0435\u0447\u044c\u0441\u044f \u043e\u0442 <code>childCount<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f\u043c\u0438:<\/p>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: Balance &#171;\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442&#187; \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0435\u0442\u043a\u0438 \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u0440\u0443\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, BalanceMemory \u043e\u0442 Memory, BalanceSpeed \u043e\u0442 Speed. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 BalanceSpeed \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d (\u0435\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0435\u0442\u043a\u0438).<\/em><\/p>\n<ul>\n<li>\n<p>Memory<br \/>\u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043a\u043b\u0435\u0442\u043a\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b.<br \/>\u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0435\u0442\u0435\u0439 \u0431\u0435\u0440\u0435\u0442 <code>childCount<\/code> \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432 \u0443\u0440\u043e\u0432\u043d\u0435 &#8212; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0434\u0432\u0438\u0433 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0435\u0431\u0435\u043d\u043a\u0430. \u0412 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>BalanceMemory<br \/>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0434\u0435\u0442\u0435\u0439 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u0434\u0432\u0438\u0433 (<code>children<\/code>), \u0438 \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0442\u0435\u0439 (<code>childCount<\/code>), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0443\u0436\u0438\u0445 \u0434\u0435\u0442\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>Speed<br \/>\u0418\u043c\u0435\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u043b\u0435\u0442\u043a\u0443, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0438\u0433\u0440\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e.<br \/>\u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0435\u0442\u0435\u0439 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u0435\u0442\u0435\u0439, \u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0438\u0432\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u043b\u0438\u0448\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<br \/>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u0432\u0443\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 ( \u0437\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 <abbr class=\"habraabbr\" title=\"\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u0440\u0435\u0431\u0440\u043e \u043e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043a \u0440\u0435\u0431\u0435\u043d\u043a\u0443\" data-title=\"&lt;p&gt;\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0432\u0438\u0434\u0443 \u0440\u0435\u0431\u0440\u043e \u043e\u0442 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043a \u0440\u0435\u0431\u0435\u043d\u043a\u0443&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;\" data-abbr=\"\u0440\u0435\u0431\u0440\u043e\">\u043b\u044f \u043a \u0440\u0435\u0431\u0435\u043d\u043a&lt;\/p&gt;&lt;p&gt;&lt;\/p&gt;&#187; data-abbr=&#187;\u0440\u0435\u0431\u0440\u043e&#187;>\u0440\u0435\u0431\u0440\u043e*<\/abbr>), \u043b\u0438\u0431\u043e \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f ( \u0441\u0440\u0430\u0437\u0443 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432). \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0431\u0440\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u0432 \u0434\u0435\u0440\u0435\u0432\u0435, \u0438 \u0434\u0435\u0442\u044c\u043c\u0438.<br \/><em>\u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0435<\/em><\/p>\n<\/li>\n<\/ul>\n<h3>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h3>\n<p> \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430, \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441.<br \/> \u0411\u0435\u0437 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0434\u043b\u044f \u0442\u0438\u043f\u0430 <code>uint32_t<\/code> \u0431\u044b\u043b \u0431\u044b  (4,3 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u0430) \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044c Memory (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0442, \u0438\u0431\u043e \u0441\u0430\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0442\u0430\u043c \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f).<br \/> \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439, \u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c  (1,1 \u0442\u0440\u0438\u043b\u043b\u0438\u043e\u043d) \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432!  <em>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u041e\u0417\u0423<br \/>\u041a\u0441\u0442\u0430\u0442\u0438 \u043f\u0440\u0438 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 cache locality.<\/em><\/p>\n<p> \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430, \u0432\u0435\u0434\u044c \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u0440\u044f\u0434-\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u043e \u0438 30-40 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432, \u0447\u0435\u0433\u043e \u0443\u0436 \u0442\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u0445 \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u043e\u0432.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u044d\u0442\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0440\u043d\u044b\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043d\u0430 \u044d\u0442\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0435\u0440\u044f\u0435\u043c, \u0432\u0435\u0434\u044c \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (1-4 \u0431\u0430\u0439\u0442) \u0438 \u0442\u0430\u043a \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u043e\u0441\u044c \u0431\u044b, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0430 \u0437\u0430\u043c\u0435\u0441\u0442\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 SAPT \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0430?<\/h2>\n<p> \u0412\u0435\u0441\u044c \u0441\u0435\u043a\u0440\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 (\u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 Speed) \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438:<br \/><abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr> \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u0443\u0435\u0442 \u0443 <code>std::vector<\/code> \u0438\u043b\u0438 <code>std::array<\/code> \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<br \/>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0430\u043c\u043e\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u0434\u043e\u0440\u043e\u0433\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430.<br \/>\u0422\u043e \u0435\u0441\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<p>\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \\ \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (\u0430\u043c\u043e\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435)    <br \/>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443                <br \/><em>(\u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c)<\/em><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c:<br \/> \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 <code>current+1<\/code>.<br \/> \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f , \u0430 \u0442\u0430\u043a\u0436\u0435 &#171;\u0441\u0430\u043c\u043e\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430&#187;, \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u0437\u043d\u0430\u0435\u043c \u043a\u0443\u0434\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c.<\/p>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0432:<\/p>\n<p>\u041f\u043e\u0438\u0441\u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \\ \u0440\u0435\u0431\u0435\u043d\u043a\u0430            <br \/>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430                               <\/p>\n<p> \u0421 \u043f\u043e\u0438\u0441\u043a\u043e\u043c Min\\Max \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0442\u043e\u0442 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0439, Min \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442  (\u0438\u0437-\u0437\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f), \u0430 Max \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043d\u0430\u0440\u0443\u0436\u043d\u043e\u0433\u043e <code>std::vector<\/code> \u0438\u043b\u0438 <code>std::array<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430 .<\/p>\n<p> \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u0435\u0442\u0435\u0439 \u0441\u0442\u0430\u043b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u043e\u0439, \u0438 \u043e\u0442\u0434\u0435\u043b\u0438\u043b\u0441\u044f, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432 \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<br \/>\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0439\u043c\u0435\u0442 , \u0433\u0434\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0432 \u043e\u0447\u0438\u0441\u0442\u043a\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b-\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u041d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442  &#8212; \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043a\u043e\u043f\u0438\u0438 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <abbr class=\"habraabbr\" title=\"Static Abstract Priority Tree\" data-title=\"&lt;p&gt;Static Abstract Priority Tree&lt;\/p&gt;\" data-abbr=\"SAPT\">SAPT<\/abbr>.<\/p>\n<p>\u041f\u043e\u0434\u0432\u0435\u0434\u044f \u0438\u0442\u043e\u0433\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \\ \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \\ \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \\ \u0440\u0435\u0431\u0435\u043d\u043a\u0430<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Min \\ Max<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"341\" width=\"341\">\n<p align=\"left\">\u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \\ \u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u043e\u0439<\/p>\n<\/td>\n<td data-colwidth=\"263\" width=\"263\">\n<p align=\"left\"> \\ <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">struct Memory {     std::uint16_t cell_y;     std::uint16_t cell_x;      std::uint16_t priority;     std::uint8_t childCount; }; struct BalanceMemoryMini; \/\/ With uint16_t children       || -2 bytes struct BalanceMemory {     std::uint32_t children; \/\/ Index of first child        std::uint16_t cell_y;     std::uint16_t cell_x;     std::uint16_t priority;      std::uint8_t childCount;     std::uint8_t childrenFragmentIndexBy; }; struct BalanceSpeed {     std::uint32_t *cell;      std::uint32_t parent;     std::uint32_t children; \/\/ Index of first child     std::uint16_t priority;      std::uint8_t childCount;     std::uint8_t childrenFragmentIndexBy;     std::uint8_t parentFragmentIndexBy; }; struct SpeedMini; \/\/ With uint16_t children[3] &amp; parent   || -8 bytes struct Speed {     std::uint32_t children[3];     std::uint32_t parent;        std::uint32_t *cell;     std::uint16_t priority;        std::uint8_t childrenFragmentIndexBy[3];     std::uint8_t parentFragmentIndexBy; };  \/\/ Example \/\/ Massive with trees \\\/ \/\/ Every Tree is massive with levels \\\/ \/\/ Every Level is massive with profiles \\\/ std::vector&lt;std::vector&lt;std::vector&lt;Memory&gt;&gt;&gt; sapts; <\/code><\/pre>\n<p>\u042d\u0442\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0431\u0435\u0437 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<\/div>\n<\/details>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u043a \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e, \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0438\u0431\u043a\u0443\u044e <u>\u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e<\/u> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 .<br \/>\u041d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u0443\u0448\u043b\u043e 5 \u0434\u043d\u0435\u0439, \u0438 \u0435\u0449\u0435 5 \u0434\u043d\u0435\u0439 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u0438\u0441\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435! <\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e \u0432\u0430\u0448\u0438\u0445 \u0438\u0434\u0435\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043b\u0438 \u0432\u0430\u043c \u0441\u0442\u0430\u0442\u044c\u044f, \u0438 \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 SAPT.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876878\/\"> https:\/\/habr.com\/ru\/articles\/876878\/<\/a><br \/><\/br><\/br><\/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-446252","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446252","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=446252"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446252\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}