{"id":381007,"date":"2024-06-29T03:25:25","date_gmt":"2024-06-29T03:25:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=381007"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=381007","title":{"rendered":"<span>\u0420\u0430\u0437\u0431\u043e\u0440 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u0432 Google, Facebook, Amazon<\/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<h3>\u258d \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0433\u043e\u0442\u043e\u0432\u043b\u044e\u0441\u044c \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441\u0442\u0430\u0436\u0435\u0440\u0430 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043e\u043a\u043e\u043b\u043e-FAANG \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0434\u0432\u0443\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441 <a href=\"http:\/\/leetcode.com\" rel=\"noopener noreferrer nofollow\">leetcode.com<\/a>.<\/p>\n<h4>\u258d 1. Guess the Word<\/h4>\n<p><strong><em>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/em><\/strong><\/p>\n<p>    \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0422\u0430\u043a \u0436\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <em>Master<\/em>, \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043f\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u043d\u0435\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043c\u0435\u0442\u043e\u0434 <em>guess()<\/em> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <em>Master<\/em> \u0432\u0435\u0440\u043d\u0435\u0442 -1.  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0437\u0430 10 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <code>Master.guess(const std::string&amp; strToCompare) <\/code>\u043d\u0430\u0439\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430. \u0421\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>guess()<\/em> \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430.<\/p>\n<p>   \u0413\u043e\u0432\u043e\u0440\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0437\u0430 10 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043c\u0435\u0442\u043e\u0434<em> guess() \u0443 Master \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. <\/em>\u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430.<\/p>\n<pre><code class=\"cpp\">\/**  * \/\/ This is the Master's API interface.  * \/\/ You should not implement it, or speculate about its implementation  * class Master {  *   public:  *     int guess(string word);  * };  *\/ class Solution { public:          void findSecretWord(std::vector&lt;std::string>&amp; wordlist, Master&amp; master) {             } };<\/code><\/pre>\n<p><strong><em>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/em><\/strong><\/p>\n<ul>\n<li>\n<p><code>wordlist[i].length == 6<\/code><\/p>\n<\/li>\n<li>\n<p><code>wordlist[i]<\/code>\u00a0\u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 [&#8216;a&#8217;, &#8216;b&#8217;&#8230;&#8217;z&#8217;]<\/p>\n<\/li>\n<li>\n<p><code>\u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 wordList \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b<\/code><\/p>\n<\/li>\n<li>\n<p><code>\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 wordList<\/code><\/p>\n<\/li>\n<li>\n<p><code>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a Master.guess() &lt;= 10<\/code><\/p>\n<\/li>\n<li>\n<p><code>1 &lt;= wordList.length &lt;= 100<\/code><\/p>\n<\/li>\n<\/ul>\n<p><strong><em>\u041f\u0440\u0435\u0442\u0435\u0441\u0442\u044b:<\/em><\/strong><\/p>\n<ol>\n<li>\n<p><strong>    Input<\/strong><code>: wordList = [\"acckzz\",\"ccbazz\",\"eiowzz\",\"abcczz\"],               secretWord = \"acckzz\"<\/code><\/p>\n<p><strong>    Output<\/strong><code>:<\/code> <em>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <\/em><code>Master.guess()<\/code><em> , <br \/>                     \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u0437 wordList, \u043c\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e <br \/>                     \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0437\u0430 11  \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043c \u043d\u0430\u0448\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e.<\/em> <\/p>\n<\/li>\n<li>\n<p><strong>    Input:<\/strong><code> wordList = [\"acckzz\",\"ccbazz\",\"eiowzz\",\"abcczz\",                             \"abcctt\", \"abccyy\", \"abccpz\", \"abccjz\",                          \"abcczn\", \"abccer\", \"abcclk\"], <br \/>        secretWord = \"abcclk\"<\/code><\/p>\n<p><strong>Output<\/strong><code>:<\/code>   \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0435 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432 <br \/>                   10 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430<code>Master.guess(),<\/code>\u0435\u0441\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435, <br \/>                   \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0430. <\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443, \u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0430\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u0430\u043c\u0438\u043c \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 \u043f\u043e \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u0430\u043c \u043d\u0430 <a href=\"https:\/\/leetcode.com\/problems\/guess-the-word\/\" rel=\"noopener noreferrer nofollow\">leetcode.com<\/a>. <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0431\u043e\u0440<\/summary>\n<div class=\"spoiler__content\">\n<p>    \u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0432\u0430\u0436\u043d\u0430 \u0441\u0430\u043c\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c  \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <code>guess()<\/code>\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e API.  <\/p>\n<p>    \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0432\u043e\u0442 \u043e \u0447\u0435\u043c. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c\u044b\u0445 \u0445\u0443\u0434\u0448\u0438\u0439 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u0443\u0441\u0442\u044c wordList.length = 100 \u0438 \u0437\u0430\u0433\u0430\u0434\u0430\u043d\u043e \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e Q. \u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0440\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 wordList \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 guess(wordList[i]) \u043d\u0430\u0448\u0435\u0433\u043e API, \u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432 \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u0440\u0438 10 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u0445 \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 0.1, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0442\u043e \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<p>    \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u0440\u0430\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439. \u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u0437\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e str1 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 matchDistance(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432), \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435 \u0442\u0435 \u0441\u043b\u043e\u0432\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 matchDistance \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043a\u043e\u0439 str1 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0443 \u044d\u0442\u0438\u0445 \u0441\u043b\u043e\u0432 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u043e\u043d\u0438 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b str1, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443. <br \/>\u0412 \u0441\u0438\u043b\u0443 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0441\u0442\u0438, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432 99,(9)% \u0441\u043b\u0443\u0447\u0430\u0435\u0432.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0421++<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">class Solution { public:          void findSecretWord(std::vector&lt;std::string>&amp; wordlist, Master&amp; master) {         srand(10);          random_shuffle(wordlist.begin(), wordlist.end());                   for (uint8_t i = 0; i &lt; 10; ++i)                           if (wordlist.size() != 0) {                 std::string strCompareToMaster = wordlist.back();                  wordlist.pop_back();                  uint8_t matchDistanceWithSecret = master.guess(strCompareToMaster);                  std::vector&lt;std::string> tempWordListWithTheSameMatchDistance;                                   for (auto&amp; currWord : wordlist) {                     uint8_t mathDistanceWithCurrWord = 0;                                           for (uint8_t k = 0; k &lt; strCompareToMaster.size(); ++k) {                         if (strCompareToMaster[k] == currWord[k])                              mathDistanceWithCurrWord++;                      }                                              if (mathDistanceWithCurrWord == matchDistanceWithSecret)                          tempWordListWithTheSameMatchDistance.push_back(currWord);                  }                 wordlist = tempWordListWithTheSameMatchDistance;              }              } };<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043a\u043e\u0434&#8230;<br \/>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u0430\u043a-\u0442\u043e \u0438\u043d\u0430\u0447\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 PR \u043a\u043e \u043c\u043d\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/Rassska\/Leetcode\" rel=\"noopener noreferrer nofollow\">github.com\/Rassska\/Leetcode<\/a>, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043e\u0431\u0441\u0443\u0434\u0438\u043c. <\/p>\n<\/div>\n<\/details>\n<p>\u258d 2. <a href=\"https:\/\/leetcode.com\/problems\/number-of-good-ways-to-split-a-string\/\" rel=\"noopener noreferrer nofollow\"><strong>Number of Good Ways to Split a String<\/strong><\/a><\/p>\n<p><strong><em>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/em><\/strong><\/p>\n<p>    \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 <code>s<\/code> \u043d\u0430 \u0432\u0445\u043e\u0434\u0435. \u0422\u0430\u043a \u0432\u043e\u0442, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 2 \u043d\u0435\u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 <code>p<\/code> \u0438 <code>q<\/code> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0442\u043e\u0433\u0434\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u0434\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 <code>s<\/code> \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0435 <code>p<\/code> \u0440\u0430\u0432\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432 <code>q<\/code>.<br \/>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e &#171;\u0445\u043e\u0440\u043e\u0448\u0438\u0445&#187; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 <code>s<\/code>.<\/p>\n<p><strong><em>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/em><\/strong><\/p>\n<ul>\n<li>\n<p><code>s<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 [&#8216;a&#8217;, &#8216;b&#8217;&#8230;&#8217;z&#8217;].<\/p>\n<\/li>\n<li>\n<p><code>1 &lt;= s.length &lt;= 10^5<\/code><\/p>\n<\/li>\n<\/ul>\n<p><strong><em>\u041f\u0440\u0435\u0442\u0435\u0441\u0442\u044b:<br \/>   <\/em><\/strong><\/p>\n<ol>\n<li>\n<p><strong>    Input<\/strong><code>: s = \"aacaba\"<\/code> <br \/>    <strong>Output<\/strong><code>: 2.<br \/> <\/code><strong>Explanation:  <\/strong>\u0418\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c 5\u044c\u044e \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 <br \/>                           \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0438:<br \/>                             <code>p = \"a\",     q = \"acaba\" - \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aa\",    q = \"caba\" - \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aac\",   q = \"aba\" - \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aaca\",  q = \"ba\" - \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aacab\", q = \"a\" - \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<\/code><\/p>\n<\/li>\n<li>\n<p>    <strong>Input<\/strong><code>: s = \"abcd\"<br \/> <\/code><strong>Output<\/strong><code>: 1.<br \/> <\/code><strong>Explanation<\/strong><code>: p = \"ab\", q = \"cd\" - \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0438\u043c\"<br \/><\/code><\/p>\n<\/li>\n<\/ol>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0431\u043e\u0440:<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0443\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0438 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 <code>k.<\/code> \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <br \/><code>[0; k]<\/code> \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <code>[k + 1, s.size() - 1].<\/code> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <code>set <\/code>\u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0430 \u0432\u043e\u0442 \u0434\u043b\u044f \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430 \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0445\u0435\u0448-\u043c\u0430\u043f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 <code>k + 1<\/code>  <strong>\u0434\u043e <\/strong> <code>s.size() - 1.<\/code> <\/p>\n<p>    \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0445\u0435\u0448-\u043c\u0430\u043f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 <code>k + 1 <\/code>\u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0445\u0435\u0448-\u043c\u0430\u043f\u0430 \u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0438\u0437 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430 \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1fc\/880\/dc9\/1fc880dc917f7a9dccb5692d16a22f00.png\" alt=\"\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0442\u0435\u0441\u0442\u0430\" title=\"\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0442\u0435\u0441\u0442\u0430\" width=\"818\" height=\"837\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1fc\/880\/dc9\/1fc880dc917f7a9dccb5692d16a22f00.png\"\/><figcaption>\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0442\u0435\u0441\u0442\u0430<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0421++<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">class Solution { public:     Solution() {         ios::sync_with_stdio(0);         cin.tie(0);     }     int numSplits(string s) {                  std::set&lt;char> leftPref;         std::unordered_map&lt;char, int> hashMap;         int ans = 0;         for (std::size_t i = 0; i &lt; s.size(); i++) {             hashMap[s[i]]++;         }                  for (std::size_t i = 0; i &lt; s.size(); i++) {             leftPref.insert(s[i]);                          if (hashMap[s[i]] == 1) {                 hashMap.erase(s[i]);             } else {                 hashMap[s[i]]--;             }                          if (leftPref.size() == hashMap.size()) {                 ans++;             }                      }         return ans;                                } private:     const char maxen = 26; };<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043a\u043e\u0434&#8230;<br \/>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u0430\u043a-\u0442\u043e \u0438\u043d\u0430\u0447\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 PR \u043a\u043e \u043c\u043d\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/Rassska\/Leetcode\" rel=\"noopener noreferrer nofollow\">github.com\/Rassska\/Leetcode<\/a>, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043e\u0431\u0441\u0443\u0434\u0438\u043c. <\/p>\n<\/div>\n<\/details>\n<hr\/>\n<h3>\u258d \u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>    \u042f \u043c\u043e\u0433 \u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0438 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e \u0441 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u0442\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u043f\u043e\u0432\u043e\u0434 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435, \u0430 \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u043a\u0438, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430 \u0434\u043e\u0441\u0443\u0433\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/586598\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0414\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0441 5+ \u0437\u0430\u0434\u0430\u0447\u043a\u0430\u043c\u0438?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">88.18% <\/span><span class=\"tm-article-poll__answer-label\">\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439 \ud83d\ude42<\/span><span class=\"tm-article-poll__answer-votes\">97<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 88.18%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">11.82% <\/span><span class=\"tm-article-poll__answer-label\">\u0421\u0442\u0430\u0442\u044c\u0438 \u043d\u0435 \u043d\u0435\u0441\u0443\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0425\u0430\u0431\u0440<\/span><span class=\"tm-article-poll__answer-votes\">13<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 11.82%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 110 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 26 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/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\/articles\/586598\/\"> https:\/\/habr.com\/ru\/articles\/586598\/<\/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<h3>\u258d \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0433\u043e\u0442\u043e\u0432\u043b\u044e\u0441\u044c \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441\u0442\u0430\u0436\u0435\u0440\u0430 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043e\u043a\u043e\u043b\u043e-FAANG \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0434\u0432\u0443\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0441 <a href=\"http:\/\/leetcode.com\" rel=\"noopener noreferrer nofollow\">leetcode.com<\/a>.<\/p>\n<h4>\u258d 1. Guess the Word<\/h4>\n<p><strong><em>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/em><\/strong><\/p>\n<p>    \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0422\u0430\u043a \u0436\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <em>Master<\/em>, \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043f\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u043d\u0435\u0442 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043c\u0435\u0442\u043e\u0434 <em>guess()<\/em> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <em>Master<\/em> \u0432\u0435\u0440\u043d\u0435\u0442 -1.  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0435\u043c \u0437\u0430 10 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <code>Master.guess(const std::string&amp; strToCompare) <\/code>\u043d\u0430\u0439\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430. \u0421\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>guess()<\/em> \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430.<\/p>\n<p>   \u0413\u043e\u0432\u043e\u0440\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0437\u0430 10 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043c\u0435\u0442\u043e\u0434<em> guess() \u0443 Master \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. <\/em>\u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430.<\/p>\n<pre><code class=\"cpp\">\/**  * \/\/ This is the Master's API interface.  * \/\/ You should not implement it, or speculate about its implementation  * class Master {  *   public:  *     int guess(string word);  * };  *\/ class Solution { public:          void findSecretWord(std::vector&lt;std::string>&amp; wordlist, Master&amp; master) {             } };<\/code><\/pre>\n<p><strong><em>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/em><\/strong><\/p>\n<ul>\n<li>\n<p><code>wordlist[i].length == 6<\/code><\/p>\n<\/li>\n<li>\n<p><code>wordlist[i]<\/code>\u00a0\u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 [&#8216;a&#8217;, &#8216;b&#8217;&#8230;&#8217;z&#8217;]<\/p>\n<\/li>\n<li>\n<p><code>\u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 wordList \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b<\/code><\/p>\n<\/li>\n<li>\n<p><code>\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 wordList<\/code><\/p>\n<\/li>\n<li>\n<p><code>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a Master.guess() &lt;= 10<\/code><\/p>\n<\/li>\n<li>\n<p><code>1 &lt;= wordList.length &lt;= 100<\/code><\/p>\n<\/li>\n<\/ul>\n<p><strong><em>\u041f\u0440\u0435\u0442\u0435\u0441\u0442\u044b:<\/em><\/strong><\/p>\n<ol>\n<li>\n<p><strong>    Input<\/strong><code>: wordList = [\"acckzz\",\"ccbazz\",\"eiowzz\",\"abcczz\"],               secretWord = \"acckzz\"<\/code><\/p>\n<p><strong>    Output<\/strong><code>:<\/code> <em>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <\/em><code>Master.guess()<\/code><em> , <br \/>                     \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u0437 wordList, \u043c\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e <br \/>                     \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0437\u0430 11  \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043c \u043d\u0430\u0448\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e.<\/em> <\/p>\n<\/li>\n<li>\n<p><strong>    Input:<\/strong><code> wordList = [\"acckzz\",\"ccbazz\",\"eiowzz\",\"abcczz\",                             \"abcctt\", \"abccyy\", \"abccpz\", \"abccjz\",                          \"abcczn\", \"abccer\", \"abcclk\"], <br \/>        secretWord = \"abcclk\"<\/code><\/p>\n<p><strong>Output<\/strong><code>:<\/code>   \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0435 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432 <br \/>                   10 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430<code>Master.guess(),<\/code>\u0435\u0441\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435, <br \/>                   \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0430. <\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443, \u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0430\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u0430\u043c\u0438\u043c \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 \u043f\u043e \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u0430\u043c \u043d\u0430 <a href=\"https:\/\/leetcode.com\/problems\/guess-the-word\/\" rel=\"noopener noreferrer nofollow\">leetcode.com<\/a>. <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0431\u043e\u0440<\/summary>\n<div class=\"spoiler__content\">\n<p>    \u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0432\u0430\u0436\u043d\u0430 \u0441\u0430\u043c\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c  \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <code>guess()<\/code>\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e API.  <\/p>\n<p>    \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0432\u043e\u0442 \u043e \u0447\u0435\u043c. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c\u044b\u0445 \u0445\u0443\u0434\u0448\u0438\u0439 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u0443\u0441\u0442\u044c wordList.length = 100 \u0438 \u0437\u0430\u0433\u0430\u0434\u0430\u043d\u043e \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e Q. \u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0440\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 wordList \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 guess(wordList[i]) \u043d\u0430\u0448\u0435\u0433\u043e API, \u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432 \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u043f\u0440\u0438 10 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u0445 \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 0.1, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0442\u043e \u0441\u043b\u043e\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<p>    \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u0440\u0430\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439. \u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u0437\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e str1 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u043c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 matchDistance(\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432), \u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435 \u0442\u0435 \u0441\u043b\u043e\u0432\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 matchDistance \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043a\u043e\u0439 str1 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0443 \u044d\u0442\u0438\u0445 \u0441\u043b\u043e\u0432 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u043e\u043d\u0438 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b str1, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443. <br \/>\u0412 \u0441\u0438\u043b\u0443 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0441\u0442\u0438, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0432 99,(9)% \u0441\u043b\u0443\u0447\u0430\u0435\u0432.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0421++<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">class Solution { public:          void findSecretWord(std::vector&lt;std::string>&amp; wordlist, Master&amp; master) {         srand(10);          random_shuffle(wordlist.begin(), wordlist.end());                   for (uint8_t i = 0; i &lt; 10; ++i)                           if (wordlist.size() != 0) {                 std::string strCompareToMaster = wordlist.back();                  wordlist.pop_back();                  uint8_t matchDistanceWithSecret = master.guess(strCompareToMaster);                  std::vector&lt;std::string> tempWordListWithTheSameMatchDistance;                                   for (auto&amp; currWord : wordlist) {                     uint8_t mathDistanceWithCurrWord = 0;                                           for (uint8_t k = 0; k &lt; strCompareToMaster.size(); ++k) {                         if (strCompareToMaster[k] == currWord[k])                              mathDistanceWithCurrWord++;                      }                                              if (mathDistanceWithCurrWord == matchDistanceWithSecret)                          tempWordListWithTheSameMatchDistance.push_back(currWord);                  }                 wordlist = tempWordListWithTheSameMatchDistance;              }              } };<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043a\u043e\u0434&#8230;<br \/>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u0430\u043a-\u0442\u043e \u0438\u043d\u0430\u0447\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 PR \u043a\u043e \u043c\u043d\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/Rassska\/Leetcode\" rel=\"noopener noreferrer nofollow\">github.com\/Rassska\/Leetcode<\/a>, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043e\u0431\u0441\u0443\u0434\u0438\u043c. <\/p>\n<\/div>\n<\/details>\n<p>\u258d 2. <a href=\"https:\/\/leetcode.com\/problems\/number-of-good-ways-to-split-a-string\/\" rel=\"noopener noreferrer nofollow\"><strong>Number of Good Ways to Split a String<\/strong><\/a><\/p>\n<p><strong><em>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/em><\/strong><\/p>\n<p>    \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 <code>s<\/code> \u043d\u0430 \u0432\u0445\u043e\u0434\u0435. \u0422\u0430\u043a \u0432\u043e\u0442, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 2 \u043d\u0435\u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 <code>p<\/code> \u0438 <code>q<\/code> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0442\u043e\u0433\u0434\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u0434\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 <code>s<\/code> \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0435 <code>p<\/code> \u0440\u0430\u0432\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432 <code>q<\/code>.<br \/>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e &#171;\u0445\u043e\u0440\u043e\u0448\u0438\u0445&#187; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 <code>s<\/code>.<\/p>\n<p><strong><em>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/em><\/strong><\/p>\n<ul>\n<li>\n<p><code>s<\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 [&#8216;a&#8217;, &#8216;b&#8217;&#8230;&#8217;z&#8217;].<\/p>\n<\/li>\n<li>\n<p><code>1 &lt;= s.length &lt;= 10^5<\/code><\/p>\n<\/li>\n<\/ul>\n<p><strong><em>\u041f\u0440\u0435\u0442\u0435\u0441\u0442\u044b:<br \/>   <\/em><\/strong><\/p>\n<ol>\n<li>\n<p><strong>    Input<\/strong><code>: s = \"aacaba\"<\/code> <br \/>    <strong>Output<\/strong><code>: 2.<br \/> <\/code><strong>Explanation:  <\/strong>\u0418\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c 5\u044c\u044e \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 <br \/>                           \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0438:<br \/>                             <code>p = \"a\",     q = \"acaba\" - \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aa\",    q = \"caba\" - \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aac\",   q = \"aba\" - \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aaca\",  q = \"ba\" - \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<br \/>              p = \"aacab\", q = \"a\" - \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0435\u0439\"<\/code><\/p>\n<\/li>\n<li>\n<p>    <strong>Input<\/strong><code>: s = \"abcd\"<br \/> <\/code><strong>Output<\/strong><code>: 1.<br \/> <\/code><strong>Explanation<\/strong><code>: p = \"ab\", q = \"cd\" - \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \"\u0445\u043e\u0440\u043e\u0448\u0438\u043c\"<br \/><\/code><\/p>\n<\/li>\n<\/ol>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0437\u0431\u043e\u0440:<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0443\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0438 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 <code>k.<\/code> \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <br \/><code>[0; k]<\/code> \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <code>[k + 1, s.size() - 1].<\/code> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <code>set <\/code>\u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0430 \u0432\u043e\u0442 \u0434\u043b\u044f \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430 \u0437\u0430\u0432\u0435\u0434\u0435\u043c \u0445\u0435\u0448-\u043c\u0430\u043f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 <code>k + 1<\/code>  <strong>\u0434\u043e <\/strong> <code>s.size() - 1.<\/code> <\/p>\n<p>    \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0445\u0435\u0448-\u043c\u0430\u043f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441\u0442\u0440\u043e\u043a\u0438. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 <code>k + 1 <\/code>\u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0445\u0435\u0448-\u043c\u0430\u043f\u0430 \u0442\u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0438\u0437 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430 \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438.<\/p>\n<figure class=\"full-width\"><figcaption>\u041f\u043e\u044d\u0442\u0430\u043f\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0442\u0435\u0441\u0442\u0430<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0421++<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">class Solution { public:     Solution() {         ios::sync_with_stdio(0);         cin.tie(0);     }     int numSplits(string s) {                  std::set&lt;char> leftPref;         std::unordered_map&lt;char, int> hashMap;         int ans = 0;         for (std::size_t i = 0; i &lt; s.size(); i++) {             hashMap[s[i]]++;         }                  for (std::size_t i = 0; i &lt; s.size(); i++) {             leftPref.insert(s[i]);                          if (hashMap[s[i]] == 1) {                 hashMap.erase(s[i]);             } else {                 hashMap[s[i]]--;             }                          if (leftPref.size() == hashMap.size()) {                 ans++;             }                      }         return ans;                                } private:     const char maxen = 26; };<\/code><\/pre>\n<p>\u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043a\u043e\u0434&#8230;<br \/>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u0430\u043a-\u0442\u043e \u0438\u043d\u0430\u0447\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 PR \u043a\u043e \u043c\u043d\u0435 \u043d\u0430 <a href=\"https:\/\/github.com\/Rassska\/Leetcode\" rel=\"noopener noreferrer nofollow\">github.com\/Rassska\/Leetcode<\/a>, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043e\u0431\u0441\u0443\u0434\u0438\u043c. <\/p>\n<\/div>\n<\/details>\n<hr\/>\n<h3>\u258d \u0418\u0442\u043e\u0433\u0438<\/h3>\n<p>    \u042f \u043c\u043e\u0433 \u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0438 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e \u0441 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u0442\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u043f\u043e\u0432\u043e\u0434 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435, \u0430 \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u043a\u0438, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430 \u0434\u043e\u0441\u0443\u0433\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/586598\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0414\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0441 5+ \u0437\u0430\u0434\u0430\u0447\u043a\u0430\u043c\u0438?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">88.18% <\/span><span class=\"tm-article-poll__answer-label\">\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439 \ud83d\ude42<\/span><span class=\"tm-article-poll__answer-votes\">97<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 88.18%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">11.82% <\/span><span class=\"tm-article-poll__answer-label\">\u0421\u0442\u0430\u0442\u044c\u0438 \u043d\u0435 \u043d\u0435\u0441\u0443\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0425\u0430\u0431\u0440<\/span><span class=\"tm-article-poll__answer-votes\">13<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 11.82%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 110 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 26 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/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\/articles\/586598\/\"> https:\/\/habr.com\/ru\/articles\/586598\/<\/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-381007","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/381007","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=381007"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/381007\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=381007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=381007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=381007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}