{"id":192102,"date":"2013-09-01T18:44:02","date_gmt":"2013-09-01T14:44:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=192102"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=192102","title":{"rendered":"<span class=\"post_title\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0443\u0434\u043e\u043a\u0443<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/20e\/2a9\/884\/20e2a9884b125f81b2c9883dd22d7d3f.png\" alt=\"sudoku250title\" align=\"right\"\/><br \/>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a!<\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430 \u0421\u0443\u0434\u043e\u043a\u0443 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0430\u0441 \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0437\u0430 \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432 \u0434\u043e\u0440\u043e\u0433\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u043e\u0440\u043e\u0447\u0430\u0442\u044c \u043c\u043e\u0437\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0445\u043b\u0438. \u041d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/search\/?q=%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D1%81%D1%83%D0%B4%D0%BE%D0%BA%D1%83\">\u043c\u043d\u043e\u0433\u043e<\/a> \u043f\u043e\u0441\u0442\u043e\u0432 \u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0438. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0440\u0435\u0448\u0430\u0435\u0442 \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0441\u043e\u0442\u043d\u044e \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043e\u043a, \u0442\u043e \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u043f\u044b\u0442\u043b\u0438\u0432\u044b\u0439 \u0443\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u0441\u0442 \u0441\u0435\u0431\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0410 \u043a\u0430\u043a \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0421\u0443\u0434\u043e\u043a\u0443, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435? \u0418 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0441\u0435\u0442\u043a\u0438 9&#215;9?\u00bb.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c. \u041d\u043e \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u041e\u0431\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0421\u0443\u0434\u043e\u043a\u0443<\/b><\/p>\n<div class=\"spoiler_text\">\n<ol>\n<li>\u0426\u0438\u0444\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 <\/li>\n<li>\u0426\u0438\u0444\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0438\u043a\u0435<\/li>\n<li>\u0426\u0438\u0444\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u0430\u0439\u043e\u043d\u0435 (\u0420\u0430\u0439\u043e\u043d \u2014 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 3\u04453, \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0438\u0436\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u0444\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c)<\/li>\n<\/ol>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/4b1\/6ae\/079\/4b16ae0795c3c835fa725590cbbc2f12.jpg\"\/>  <\/div>\n<\/div>\n<h4>\u0428\u0430\u0433 1. \u0412\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u043a\u0443<\/h4>\n<p>  \u0421\u0435\u0442\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0421\u0443\u0434\u043e\u043a\u0443. \u0420\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 1 2\u2026 8 9, \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043d\u0438\u0436\u0435 \u0441\u043c\u0435\u0449\u0430\u0435\u043c \u043d\u0430 3 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432\u043b\u0435\u0432\u043e, \u0442.\u0435. 4 5\u2026 2 3 \u0438 7 8\u2026 5 6.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0439\u043e\u043d \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0441\u043c\u0435\u0449\u0430\u0435\u043c \u043d\u0430 1 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u043b\u0435\u0432\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0439\u043e\u043d.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u0441\u0435\u0442\u043a\u0430, \u0435\u0451 \u044f \u0438 \u043d\u0430\u0437\u043e\u0432\u0443 <i>\u0431\u0430\u0437\u043e\u0432\u043e\u0439<\/i>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/0e5\/21a\/21a\/0e521a21acc074f9043bb7cef2da2e96.jpg\"\/><\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 grid. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0428\u0430\u0433\u043e\u043c 1, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c table \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043c\u0435\u0442\u043e\u0434 show \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"python\">class grid: \tdef __init__(self,n = 3): \t\t&quot;&quot;&quot;Generation of the base table&quot;&quot;&quot; \t\tself.n = n \t\tself.table = [[((i*n + i\/n + j) % (n*n) + 1) for j in range(n*n)] for i in range(n*n)] \t\tprint &quot;The base table is ready!&quot;  \tdef __del__(self): \t\tpass \t \tdef show(self): \t\tfor i in range(self.n*self.n): \t\t\tprint self.table[i] <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0428\u0430\u0433 2. \u041f\u0435\u0440\u0435\u0442\u0430\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u043a\u0443<\/h4>\n<p>  \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0434\u043e\u0432 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0421\u0443\u0434\u043e\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438.<br \/>  \u041a \u043d\u0438\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\u0422\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u2014 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 (<i>transposing<\/i>)<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/f99\/cff\/b51\/f99cffb5143cbd7cdf1127c4ff0a606c.jpg\"\/><\/p>\n<ul>\n<li>\u041e\u0431\u043c\u0435\u043d \u0434\u0432\u0443\u0445 \u0441\u0442\u0440\u043e\u043a \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0439\u043e\u043d\u0430 (<i>swap_rows_small<\/i>)<\/li>\n<li>\u041e\u0431\u043c\u0435\u043d \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0439\u043e\u043d\u0430 (<i>swap_colums_small<\/i>)<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/2e1\/603\/f28\/2e1603f28046f64dcd2a5051e57dd559.jpg\"\/><\/p>\n<ul>\n<li>\u041e\u0431\u043c\u0435\u043d \u0434\u0432\u0443\u0445 \u0440\u0430\u0439\u043e\u043d\u043e\u0432 \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 (<i>swap_rows_area<\/i>)<\/li>\n<li>\u041e\u0431\u043c\u0435\u043d \u0434\u0432\u0443\u0445 \u0440\u0430\u0439\u043e\u043d\u043e\u0432 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 (<i>swap_colums_area<\/i>)<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d82\/caa\/4f9\/d82caa4f9424b9b63f1348eea4b2209b.jpg\"\/><\/p>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<h6>transposing<\/h6>\n<p>  <\/p>\n<pre><code class=\"python\">\tdef transposing(self): \t\t&quot;&quot;&quot; Transposing the whole grid &quot;&quot;&quot; \t\tself.table = map(list, zip(*self.table)) <\/code><\/pre>\n<p>  <\/p>\n<h6>swap_rows_small<\/h6>\n<p>  <\/p>\n<pre><code class=\"python\">\tdef swap_rows_small(self): \t\t&quot;&quot;&quot; Swap the two rows &quot;&quot;&quot; \t\tarea = random.randrange(0,self.n,1) \t\tline1 = random.randrange(0,self.n,1) \t\t#\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0440\u0430\u0439\u043e\u043d\u0430 \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \t\tN1 = area*self.n + line1 \t\t#\u043d\u043e\u043c\u0435\u0440 1 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430  \t\tline2 = random.randrange(0,self.n,1) \t\twhile (line1 == line2): \t\t\tline2 = random.randrange(0,self.n,1)  \t\tN2 = area*self.n + line2 \t\t#\u043d\u043e\u043c\u0435\u0440 2 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430  \t\tself.table[N1],self.table[N2] = self.table[N2], self.table[N1] <\/code><\/pre>\n<p>  <\/p>\n<h6>swap_colums_small<\/h6>\n<p>  \u0414\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0443 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:  <\/p>\n<pre><code class=\"python\">\tdef swap_colums_small(self): \t\tgrid.transposing(self) \t\tgrid.swap_rows_small(self) \t\tgrid.transposing(self) <\/code><\/pre>\n<p>  <\/p>\n<h6>swap_rows_area<\/h6>\n<p>  <\/p>\n<pre><code class=\"python\">\tdef swap_rows_area(self): \t\t&quot;&quot;&quot; Swap the two area horizon &quot;&quot;&quot; \t\tarea1 = random.randrange(0,self.n,1) \t\t#\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0440\u0430\u0439\u043e\u043d\u0430  \t\tarea2 = random.randrange(0,self.n,1) \t\twhile (area1 == area2): \t\t\tarea2 = random.randrange(0,self.n,1)  \t\tfor i in range(0, self.n): \t\t\tN1, N2 = area1*self.n + i, area2*self.n + i \t\t\tself.table[N1], self.table[N2] = self.table[N2], self.table[N1] <\/code><\/pre>\n<p>  <\/p>\n<h6>swap_colums_area<\/h6>\n<p>  <\/p>\n<pre><code class=\"python\">\tdef swap_colums_small(self): \t\tgrid.transposing(self) \t\tgrid.swap_rows_area(self) \t\tgrid.transposing(self) <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e, \u0434\u0443\u043c\u0430\u044e, \u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c\u0438. \u042d\u0442\u043e\u0442 \u043a\u0430\u0440\u043a\u0430\u0441 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%BD%D0%B2%D0%B0%D1%80%D0%B8%D0%B0%D0%BD%D1%82\">\u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/a>\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435, \u0442\u0430\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0435\u0441\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0434 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u041a\u0443\u0431\u0438\u043a\u0430 \u0420\u0443\u0431\u0438\u043a\u0430. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f. \u0422\u0430\u043a \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043c, amt \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0439:  <\/p>\n<pre><code class=\"python\">\tdef mix(self,amt = 10): \t\tmix_func = ['self.transposing()',  \t\t\t\t\t'self.swap_rows_small()',  \t\t\t\t\t'self.swap_colums_small()',  \t\t\t\t\t'self.swap_rows_area()',  \t\t\t\t\t'self.swap_colums_area()'] \t\tfor i in xrange(1, amt): \t\t\tid_func = random.randrange(0,len(mix_func),1) \t\t\teval(mix_func[id_func]) <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 10 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">base [1, 2, 3, 4, 5, 6, 7, 8, 9] [4, 5, 6, 7, 8, 9, 1, 2, 3] [7, 8, 9, 1, 2, 3, 4, 5, 6] [2, 3, 4, 5, 6, 7, 8, 9, 1] [5, 6, 7, 8, 9, 1, 2, 3, 4] [8, 9, 1, 2, 3, 4, 5, 6, 7] [3, 4, 5, 6, 7, 8, 9, 1, 2] [6, 7, 8, 9, 1, 2, 3, 4, 5] [9, 1, 2, 3, 4, 5, 6, 7, 8]  swap_colums_area [7, 8, 9, 4, 5, 6, 1, 2, 3] [1, 2, 3, 7, 8, 9, 4, 5, 6] [4, 5, 6, 1, 2, 3, 7, 8, 9] [8, 9, 1, 5, 6, 7, 2, 3, 4] [2, 3, 4, 8, 9, 1, 5, 6, 7] [5, 6, 7, 2, 3, 4, 8, 9, 1] [9, 1, 2, 6, 7, 8, 3, 4, 5] [3, 4, 5, 9, 1, 2, 6, 7, 8] [6, 7, 8, 3, 4, 5, 9, 1, 2]  swap_colums_small [7, 8, 9, 4, 5, 6, 2, 1, 3] [1, 2, 3, 7, 8, 9, 5, 4, 6] [4, 5, 6, 1, 2, 3, 8, 7, 9] [8, 9, 1, 5, 6, 7, 3, 2, 4] [2, 3, 4, 8, 9, 1, 6, 5, 7] [5, 6, 7, 2, 3, 4, 9, 8, 1] [9, 1, 2, 6, 7, 8, 4, 3, 5] [3, 4, 5, 9, 1, 2, 7, 6, 8] [6, 7, 8, 3, 4, 5, 1, 9, 2]  swap_colums_small [7, 8, 9, 4, 5, 6, 1, 2, 3] [1, 2, 3, 7, 8, 9, 4, 5, 6] [4, 5, 6, 1, 2, 3, 7, 8, 9] [8, 9, 1, 5, 6, 7, 2, 3, 4] [2, 3, 4, 8, 9, 1, 5, 6, 7] [5, 6, 7, 2, 3, 4, 8, 9, 1] [9, 1, 2, 6, 7, 8, 3, 4, 5] [3, 4, 5, 9, 1, 2, 6, 7, 8] [6, 7, 8, 3, 4, 5, 9, 1, 2]  transposing [7, 1, 4, 8, 2, 5, 9, 3, 6] [8, 2, 5, 9, 3, 6, 1, 4, 7] [9, 3, 6, 1, 4, 7, 2, 5, 8] [4, 7, 1, 5, 8, 2, 6, 9, 3] [5, 8, 2, 6, 9, 3, 7, 1, 4] [6, 9, 3, 7, 1, 4, 8, 2, 5] [1, 4, 7, 2, 5, 8, 3, 6, 9] [2, 5, 8, 3, 6, 9, 4, 7, 1] [3, 6, 9, 4, 7, 1, 5, 8, 2]  swap_colums_small [7, 1, 4, 8, 2, 5, 6, 3, 9] [8, 2, 5, 9, 3, 6, 7, 4, 1] [9, 3, 6, 1, 4, 7, 8, 5, 2] [4, 7, 1, 5, 8, 2, 3, 9, 6] [5, 8, 2, 6, 9, 3, 4, 1, 7] [6, 9, 3, 7, 1, 4, 5, 2, 8] [1, 4, 7, 2, 5, 8, 9, 6, 3] [2, 5, 8, 3, 6, 9, 1, 7, 4] [3, 6, 9, 4, 7, 1, 2, 8, 5]  swap_rows_small [7, 1, 4, 8, 2, 5, 6, 3, 9] [8, 2, 5, 9, 3, 6, 7, 4, 1] [9, 3, 6, 1, 4, 7, 8, 5, 2] [5, 8, 2, 6, 9, 3, 4, 1, 7] [4, 7, 1, 5, 8, 2, 3, 9, 6] [6, 9, 3, 7, 1, 4, 5, 2, 8] [1, 4, 7, 2, 5, 8, 9, 6, 3] [2, 5, 8, 3, 6, 9, 1, 7, 4] [3, 6, 9, 4, 7, 1, 2, 8, 5]  swap_rows_small [7, 1, 4, 8, 2, 5, 6, 3, 9] [8, 2, 5, 9, 3, 6, 7, 4, 1] [9, 3, 6, 1, 4, 7, 8, 5, 2] [5, 8, 2, 6, 9, 3, 4, 1, 7] [4, 7, 1, 5, 8, 2, 3, 9, 6] [6, 9, 3, 7, 1, 4, 5, 2, 8] [2, 5, 8, 3, 6, 9, 1, 7, 4] [1, 4, 7, 2, 5, 8, 9, 6, 3] [3, 6, 9, 4, 7, 1, 2, 8, 5]  swap_rows_area [7, 1, 4, 8, 2, 5, 6, 3, 9] [8, 2, 5, 9, 3, 6, 7, 4, 1] [9, 3, 6, 1, 4, 7, 8, 5, 2] [2, 5, 8, 3, 6, 9, 1, 7, 4] [1, 4, 7, 2, 5, 8, 9, 6, 3] [3, 6, 9, 4, 7, 1, 2, 8, 5] [5, 8, 2, 6, 9, 3, 4, 1, 7] [4, 7, 1, 5, 8, 2, 3, 9, 6] [6, 9, 3, 7, 1, 4, 5, 2, 8]  swap_colums_small [7, 1, 4, 8, 2, 5, 6, 9, 3] [8, 2, 5, 9, 3, 6, 7, 1, 4] [9, 3, 6, 1, 4, 7, 8, 2, 5] [2, 5, 8, 3, 6, 9, 1, 4, 7] [1, 4, 7, 2, 5, 8, 9, 3, 6] [3, 6, 9, 4, 7, 1, 2, 5, 8] [5, 8, 2, 6, 9, 3, 4, 7, 1] [4, 7, 1, 5, 8, 2, 3, 6, 9] [6, 9, 3, 7, 1, 4, 5, 8, 2] <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0428\u0430\u0433 3. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0435\u0442\u043e\u043a<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 (\u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f). \u0418 \u044d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c. \u041a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f? \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0436\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0421\u0443\u0434\u043e\u043a\u0443. \u0412\u0441\u0435\u0433\u043e \u0432 \u0421\u0443\u0434\u043e\u043a\u0443 81 \u043a\u043b\u0435\u0442\u043a\u0430, \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u043b\u0451\u0433\u043a\u0438\u043c \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u043f\u043e\u043b\u0435 \u0435\u0441\u0442\u044c 30-35 \u00ab\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a\u00bb, \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u2014 25-30, \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u2014 20-25. \u042d\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u043a\u043e\u043d\u043e\u0432 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c 30-\u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u043d\u0435\u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043c\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438 22 \u043a\u043b\u0435\u0442\u043e\u0447\u043d\u044b\u0439 \u00ab\u043b\u0451\u0433\u043a\u0438\u0439\u00bb.<\/p>\n<ul>\n<li><b>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434<\/b> \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c 50-60 \u043a\u043b\u0435\u0442\u043e\u043a \u043d\u0430\u0443\u0433\u0430\u0434, \u043d\u043e \u0433\u0434\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0442\u043e \u0421\u0443\u0434\u043e\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c? \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b 3 \u0441\u0442\u0440\u043e\u043a\u0438 ( = 27 \u043a\u043b\u0435\u0442\u043e\u043a) <\/li>\n<li><b>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c<\/b> \u2014 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e N \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u0430, \u0442\u0430\u043a \u0447\u0442\u043e N \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c\u0438. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u044f N = 0 \u2014 \u0434\u043b\u044f \u043b\u0451\u0433\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439, N=1 \u2014 \u0441\u0440\u0435\u0434\u043d\u0438\u0439, N=2 \u2014 \u0441\u043b\u043e\u0436\u043d\u044b\u0439<\/li>\n<\/ul>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0432\u044b\u0447\u0451\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044e \u044f\u0447\u0435\u0435\u043a (\u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0432\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u043d\u0430\u0441 81 \u044f\u0447\u0435\u0439\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c):<\/p>\n<ol>\n<li>\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 N<\/li>\n<li>\u041e\u0442\u043c\u0435\u0442\u0438\u0442\u044c N \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0439<\/li>\n<li>\u0423\u0434\u0430\u043b\u0438\u0442\u044c N<\/li>\n<li>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043e\u043d\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0442\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c N \u043e\u0431\u0440\u0430\u0442\u043d\u043e<\/li>\n<\/ol>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0421\u0443\u0434\u043e\u043a\u0443 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f difficult \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<pre><code class=\"python\"> flook = [[0 for j in range(example.n*example.n)] for i in range(example.n*example.n)] iterator = 0 difficult = example.n ** 4 #\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043c\u0435\u0441\u0442\u0435  while iterator &lt; example.n ** 4: \ti,j = random.randrange(0, example.n*example.n ,1), random.randrange(0, example.n*example.n ,1) # \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \tif flook[i][j] == 0:\t#\u0415\u0441\u043b\u0438 \u0435\u0451 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \t\titerator += 1 \t\tflook[i][j] = 1 \t#\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c  \t\ttemp = example.table[i][j]\t#\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0445 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \t\texample.table[i][j] = 0 \t\tdifficult -= 1 #\u0423\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u043c, \u0435\u0441\u043b\u0438 \u0443\u0431\u0440\u0430\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442  \t\ttable_solution = [] \t\tfor copy_i in range(0, example.n*example.n): \t\t\ttable_solution.append(example.table[copy_i][:]) #\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a  \t\ti_solution = 0 \t\tfor solution in solver.solve_sudoku((example.n, example.n), table_solution): \t\t\ti_solution += 1 #\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439  \t\tif i_solution != 1: #\u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 -- \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \t\t\texample.table[i][j] = temp \t\t\tdifficult += 1  #\u041e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u043c  example.show() print &quot;difficult = &quot;,difficult <\/code><\/pre>\n<div class=\"spoiler\"><b class=\"spoiler_title\">sudoku_generator.py<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># coding=utf-8 import random import solver  class grid: \tdef __init__(self,n = 3): \t\t&quot;&quot;&quot; Generation of the base table &quot;&quot;&quot; \t\tself.n = n \t\tself.table = [[ ((i*n + i\/n + j) % (n*n) + 1) for j in range(n*n)] for i in range(n*n)] \t\tprint &quot;The base table is ready!&quot;  \tdef __del__(self): \t\tpass \t \tdef show(self): \t\tfor i in range(self.n*self.n): \t\t\tprint self.table[i]  \tdef transposing(self): \t\t&quot;&quot;&quot; Transposing the whole grid &quot;&quot;&quot; \t\tself.table = map(list, zip(*self.table))  \tdef swap_rows_small(self): \t\t&quot;&quot;&quot; Swap the two rows &quot;&quot;&quot; \t\tarea = random.randrange(0,self.n,1) \t\tline1 = random.randrange(0,self.n,1) \t\t#\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0440\u0430\u0439\u043e\u043d\u0430 \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \t\tN1 = area*self.n + line1 \t\t#\u043d\u043e\u043c\u0435\u0440 1 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430  \t\tline2 = random.randrange(0,self.n,1) \t\t#\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043d\u043e \u043d\u0435 \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \t\twhile (line1 == line2): \t\t\tline2 = random.randrange(0,self.n,1)  \t\tN2 = area*self.n + line2 \t\t#\u043d\u043e\u043c\u0435\u0440 2 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430  \t\tself.table[N1],self.table[N2] = self.table[N2], self.table[N1]   \tdef swap_colums_small(self): \t\tgrid.transposing(self) \t\tgrid.swap_rows_small(self) \t\tgrid.transposing(self)   \tdef swap_rows_area(self): \t\t&quot;&quot;&quot; Swap the two area horizon &quot;&quot;&quot; \t\tarea1 = random.randrange(0,self.n,1) \t\t#\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0440\u0430\u0439\u043e\u043d\u0430  \t\tarea2 = random.randrange(0,self.n,1) \t\t#\u0435\u0449\u0451 \u0440\u0430\u0439\u043e\u043d, \u043d\u043e \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \t\twhile (area1 == area2): \t\t\tarea2 = random.randrange(0,self.n,1)  \t\tfor i in range(0, self.n): \t\t\tN1, N2 = area1*self.n + i, area2*self.n + i \t\t\tself.table[N1], self.table[N2] = self.table[N2], self.table[N1]   \tdef swap_colums_area(self): \t\tgrid.transposing(self) \t\tgrid.swap_rows_area(self) \t\tgrid.transposing(self) \t \tdef mix(self,amt = 10): \t\tmix_func = ['self.transposing()',  \t\t\t\t\t'self.swap_rows_small()',  \t\t\t\t\t'self.swap_colums_small()',  \t\t\t\t\t'self.swap_rows_area()',  \t\t\t\t\t'self.swap_colums_area()'] \t\tfor i in xrange(1, amt): \t\t\tid_func = random.randrange(0,len(mix_func),1) \t\t\teval(mix_func[id_func])  example = grid() example.mix()  flook = [[0 for j in range(example.n*example.n)] for i in range(example.n*example.n)] iterator = 0 difficult = example.n ** 4 #\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u043c\u0435\u0441\u0442\u0435  example.show()  print &quot;---------------------------&quot;  while iterator &lt; example.n ** 4: \ti,j = random.randrange(0, example.n*example.n ,1), random.randrange(0, example.n*example.n ,1) # \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \tif flook[i][j] == 0:\t#\u0415\u0441\u043b\u0438 \u0435\u0451 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \t\titerator += 1 \t\tflook[i][j] = 1 \t#\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c  \t\ttemp = example.table[i][j]\t#\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0445 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \t\texample.table[i][j] = 0 \t\tdifficult -= 1 #\u0423\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u043c \u0435\u0441\u043b\u0438 \u0443\u0431\u0440\u0430\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442  \t\ttable_solution = [] \t\tfor copy_i in range(0, example.n*example.n): \t\t\ttable_solution.append(example.table[copy_i][:]) #\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a  \t\ti_solution = 0 \t\tfor solution in solver.solve_sudoku((example.n, example.n), table_solution): \t\t\ti_solution += 1 #\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439  \t\tif i_solution != 1: #\u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \t\t\texample.table[i][j] = temp \t\t\tdifficult += 1 # \u041e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u043c  example.show() print &quot;difficult = &quot;,difficult <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">solver.py<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python3  # Author: Ali Assaf &lt;ali.assaf.mail@gmail.com&gt; # Copyright: (C) 2010 Ali Assaf # License: GNU General Public License &lt;http:\/\/www.gnu.org\/licenses\/&gt;  from itertools import product  def solve_sudoku(size, grid):     &quot;&quot;&quot; An efficient Sudoku solver using Algorithm X.      &gt;&gt;&gt; grid = [     ...     [5, 3, 0, 0, 7, 0, 0, 0, 0],     ...     [6, 0, 0, 1, 9, 5, 0, 0, 0],     ...     [0, 9, 8, 0, 0, 0, 0, 6, 0],     ...     [8, 0, 0, 0, 6, 0, 0, 0, 3],     ...     [4, 0, 0, 8, 0, 3, 0, 0, 1],     ...     [7, 0, 0, 0, 2, 0, 0, 0, 6],     ...     [0, 6, 0, 0, 0, 0, 2, 8, 0],     ...     [0, 0, 0, 4, 1, 9, 0, 0, 5],     ...     [0, 0, 0, 0, 8, 0, 0, 7, 9]]     &gt;&gt;&gt; for solution in solve_sudoku((3, 3), grid):     ...     print(*solution, sep='\\\\n')     [5, 3, 4, 6, 7, 8, 9, 1, 2]     [6, 7, 2, 1, 9, 5, 3, 4, 8]     [1, 9, 8, 3, 4, 2, 5, 6, 7]     [8, 5, 9, 7, 6, 1, 4, 2, 3]     [4, 2, 6, 8, 5, 3, 7, 9, 1]     [7, 1, 3, 9, 2, 4, 8, 5, 6]     [9, 6, 1, 5, 3, 7, 2, 8, 4]     [2, 8, 7, 4, 1, 9, 6, 3, 5]     [3, 4, 5, 2, 8, 6, 1, 7, 9]     &quot;&quot;&quot;     R, C = size     N = R * C     X = ([(&quot;rc&quot;, rc) for rc in product(range(N), range(N))] +          [(&quot;rn&quot;, rn) for rn in product(range(N), range(1, N + 1))] +          [(&quot;cn&quot;, cn) for cn in product(range(N), range(1, N + 1))] +          [(&quot;bn&quot;, bn) for bn in product(range(N), range(1, N + 1))])     Y = dict()     for r, c, n in product(range(N), range(N), range(1, N + 1)):         b = (r \/\/ R) * R + (c \/\/ C) # Box number         Y[(r, c, n)] = [             (&quot;rc&quot;, (r, c)),             (&quot;rn&quot;, (r, n)),             (&quot;cn&quot;, (c, n)),             (&quot;bn&quot;, (b, n))]     X, Y = exact_cover(X, Y)     for i, row in enumerate(grid):         for j, n in enumerate(row):             if n:                 select(X, Y, (i, j, n))     for solution in solve(X, Y, []):         for (r, c, n) in solution:             grid[r][c] = n         yield grid  def exact_cover(X, Y):     X = {j: set() for j in X}     for i, row in Y.items():         for j in row:             X[j].add(i)     return X, Y  def solve(X, Y, solution):     if not X:         yield list(solution)     else:         c = min(X, key=lambda c: len(X[c]))         for r in list(X[c]):             solution.append(r)             cols = select(X, Y, r)             for s in solve(X, Y, solution):                 yield s             deselect(X, Y, r, cols)             solution.pop()  def select(X, Y, r):     cols = []     for j in Y[r]:         for i in X[j]:             for k in Y[i]:                 if k != j:                     X[k].remove(i)         cols.append(X.pop(j))     return cols  def deselect(X, Y, r, cols):     for j in reversed(Y[r]):         X[j] = cols.pop()         for i in X[j]:             for k in Y[i]:                 if k != j:                     X[k].add(i)  if __name__ == &quot;__main__&quot;:     import doctest     doctest.testmod() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">The base table is ready! [5, 4, 6, 8, 7, 9, 2, 1, 3] [8, 7, 9, 2, 1, 3, 5, 4, 6] [2, 1, 3, 5, 4, 6, 8, 7, 9] [6, 5, 7, 9, 8, 1, 3, 2, 4] [9, 8, 1, 3, 2, 4, 6, 5, 7] [3, 2, 4, 6, 5, 7, 9, 8, 1] [7, 6, 8, 1, 9, 2, 4, 3, 5] [1, 9, 2, 4, 3, 5, 7, 6, 8] [4, 3, 5, 7, 6, 8, 1, 9, 2] --------------------------- [0, 0, 6, 0, 0, 0, 0, 0, 0] [8, 7, 0, 0, 1, 0, 0, 0, 6] [0, 0, 0, 5, 4, 0, 0, 0, 9] [6, 0, 0, 0, 8, 1, 3, 0, 4] [0, 0, 0, 3, 0, 0, 0, 5, 0] [0, 0, 0, 0, 0, 7, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0, 0, 0] [0, 9, 0, 4, 0, 0, 0, 0, 8] [0, 0, 5, 0, 6, 0, 1, 0, 0] difficult =  22 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <a href=\"http:\/\/www.denisbalyko.com\/sudoku_generator.zip\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0432 zip<\/a><\/p>\n<p>  \u042f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0421\u0443\u0434\u043e\u043a\u0443. \u041c\u043e\u044f \u0446\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0438, \u044f \u043c\u043e\u0433\u0443 \u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \ud83d\ude42<br \/>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0437\u0434\u0435\u0441\u044c \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0421\u0443\u0434\u043e\u043a\u0443 9\u04459. \u041d\u043e \u043d\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u043d\u0430 16\u044516 \u0438 25\u044525.<\/p>\n<ul>\n<li>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f <a href=\"http:\/\/www.cs.mcgill.ca\/~aassaf9\/python\/algorithm_x.html\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0425<\/a> \u0438 \u0435\u0433\u043e <a href=\"http:\/\/www.cs.mcgill.ca\/~aassaf9\/python\/sudoku.txt\">\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a> \u0434\u043b\u044f \u0421\u0443\u0434\u043e\u043a\u0443<\/li>\n<li>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0421\u0443\u0434\u043e\u043a\u0443 \u043d\u0430 \u0432\u0441\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 <a href=\"http:\/\/rosettacode.org\/wiki\/Sudoku\">http:\/\/rosettacode.org\/wiki\/Sudoku<\/a><\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439.<br \/>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.    \t<\/p>\n<div class=\"clear\"><\/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=\"http:\/\/habrahabr.ru\/post\/192102\/\"> http:\/\/habrahabr.ru\/post\/192102\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/20e\/2a9\/884\/20e2a9884b125f81b2c9883dd22d7d3f.png\" alt=\"sudoku250title\" align=\"right\"\/><br \/>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a!<\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430 \u0421\u0443\u0434\u043e\u043a\u0443 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0430\u0441 \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442 \u0437\u0430 \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432 \u0434\u043e\u0440\u043e\u0433\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u043e\u0440\u043e\u0447\u0430\u0442\u044c \u043c\u043e\u0437\u0433\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0445\u043b\u0438. \u041d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/search\/?q=%D1%80%D0%B5%D1%88%D0%B5%D0%BD%D0%B8%D0%B5+%D1%81%D1%83%D0%B4%D0%BE%D0%BA%D1%83\">\u043c\u043d\u043e\u0433\u043e<\/a> \u043f\u043e\u0441\u0442\u043e\u0432 \u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0438. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0440\u0435\u0448\u0430\u0435\u0442 \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0441\u043e\u0442\u043d\u044e \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043e\u043a, \u0442\u043e \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u043f\u044b\u0442\u043b\u0438\u0432\u044b\u0439 \u0443\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u0441\u0442 \u0441\u0435\u0431\u0435 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0410 \u043a\u0430\u043a \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0421\u0443\u0434\u043e\u043a\u0443, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435? \u0418 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0441\u0435\u0442\u043a\u0438 9&#215;9?\u00bb.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c. \u041d\u043e \u043c\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f. \u041e\u0431\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/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-192102","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192102","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=192102"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192102\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}