{"id":256560,"date":"2015-05-04T23:42:01","date_gmt":"2015-05-04T19:42:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=256560"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=256560","title":{"rendered":"\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u043e\u0432 \u043d\u0430 Perl"},"content":{"rendered":"<p>     \t\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438 \u0438\u0433\u0440\u0435 \u0432 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u043e\u0442 \u0432\u0445\u043e\u0434\u0430 \u0434\u043e \u0432\u044b\u0445\u043e\u0434\u0430. \u041f\u0443\u0442\u044c-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0430. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u044f\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<h4>\u0427\u0438\u0442\u0430\u0435\u043c \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442<\/h4>\n<p>  \u041b\u0430\u0431\u0438\u0440\u0438\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SVG, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0435\u0433\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0435\u0440\u0445 \u043d\u0435\u0433\u043e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0430 \u0432 SVG:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?&gt; &lt;!DOCTYPE svg PUBLIC &quot;-\/\/W3C\/\/DTD SVG 1.1\/\/EN&quot; &quot;http:\/\/www.w3.org\/Graphics\/SVG\/1.1\/DTD\/svg11.dtd&quot;&gt; &lt;svg width=&quot;112&quot; height=&quot;96&quot; version=&quot;1.1&quot; xmlns=&quot;http:\/\/www.w3.org\/2000\/svg&quot;&gt;   &lt;rect width=&quot;112&quot; height=&quot;96&quot; fill=&quot;white&quot; stroke=&quot;none&quot; \/&gt;   &lt;title&gt;5 by 4 orthogonal maze&lt;\/title&gt;   &lt;g fill=&quot;none&quot; stroke=&quot;#000000&quot; stroke-width=&quot;3&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;     &lt;line x1=&quot;16&quot; y1=&quot;16&quot; x2=&quot;32&quot; y2=&quot;16&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;16&quot; x2=&quot;80&quot; y2=&quot;16&quot; \/&gt;     &lt;line x1=&quot;16&quot; y1=&quot;80&quot; x2=&quot;96&quot; y2=&quot;80&quot; \/&gt;     &lt;line x1=&quot;16&quot; y1=&quot;16&quot; x2=&quot;16&quot; y2=&quot;80&quot; \/&gt;     &lt;line x1=&quot;96&quot; y1=&quot;16&quot; x2=&quot;96&quot; y2=&quot;80&quot; \/&gt;     &lt;line x1=&quot;64&quot; y1=&quot;16&quot; x2=&quot;64&quot; y2=&quot;32&quot; \/&gt;     &lt;line x1=&quot;32&quot; y1=&quot;32&quot; x2=&quot;32&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;32&quot; y1=&quot;32&quot; x2=&quot;48&quot; y2=&quot;32&quot; \/&gt;     &lt;line x1=&quot;64&quot; y1=&quot;32&quot; x2=&quot;64&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;64&quot; y1=&quot;32&quot; x2=&quot;80&quot; y2=&quot;32&quot; \/&gt;     &lt;line x1=&quot;32&quot; y1=&quot;48&quot; x2=&quot;48&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;48&quot; x2=&quot;48&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;48&quot; x2=&quot;64&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;80&quot; y1=&quot;48&quot; x2=&quot;80&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;16&quot; y1=&quot;64&quot; x2=&quot;32&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;64&quot; x2=&quot;64&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;80&quot; y1=&quot;64&quot; x2=&quot;80&quot; y2=&quot;80&quot; \/&gt;   &lt;\/g&gt;    &lt;g fill=&quot;black&quot; stroke=&quot;none&quot; stroke-width=&quot;1&quot;&gt;     &lt;text x=&quot;24&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;1&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;2&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;3&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;4&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;5&lt;\/text&gt;     &lt;text x=&quot;24&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;6&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;7&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;8&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;9&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;10&lt;\/text&gt;     &lt;text x=&quot;24&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;11&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;12&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;13&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;14&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;15&lt;\/text&gt;     &lt;text x=&quot;24&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;16&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;17&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;18&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;19&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;20&lt;\/text&gt;   &lt;\/g&gt; &lt;\/svg&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/230\/b16\/b2f\/230b16b2f426458099389b899dcfdcdb.png\"\/><\/p>\n<p>  \u0424\u0430\u0439\u043b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0430\u043c\u0438 \u2013 \u043e\u0434\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u2013 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u0438\u043d\u0438\u0439.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0420\u0430\u0437\u043c\u0435\u0440:<\/p>\n<pre><code class=\"perl\">m\/&lt;title&gt;([0-9]*)\\sby\\s([0-9]*).*\/g <\/code><\/pre>\n<p>  \u041b\u0438\u043d\u0438\u0438:<\/p>\n<pre><code class=\"perl\">m\/&lt;line x1=\\&quot;([0-9]+)\\&quot; y1=\\&quot;([0-9]+)\\&quot; x2=\\&quot;([0-9]+)\\&quot; y2=\\&quot;([0-9]+)\\&quot; \\\/&gt;+\/g <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0445\u0440\u0430\u043d\u044f\u0449\u0443\u044e \u043b\u0438\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"perl\">{     &quot;x1&quot; =&gt; 0,     &quot;y1&quot; =&gt; 0,     &quot;x2&quot; =&gt; 0,     &quot;y2&quot; =&gt; 0 } <\/code><\/pre>\n<p>  \u0412 svg-\u0444\u0430\u0439\u043b\u0435 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f\u0445 16. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u043c x \u0438 y \u043d\u0430 16, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u2013 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0432\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0437 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0438.<\/p>\n<h4>\u0421\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0441\u0435\u0434\u0435\u0439<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u2013 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0441\u0435\u0434\u0435\u0439. \u042d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c.<\/p>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0430:<\/p>\n<pre><code class=\"bash\">1:  2   6    2:  0   3   1    3:  8   2    4:  5    5:  0   10  4    6:  1   11   7:  8    8:  3   7    9:  10  14   10: 5   15  9    11: 6   12   12: 17  11   13: 14   14: 9   19  13   15: 10  20   16: 17   17: 12  18  16   18: 19  17   19: 14  18   20: 15   <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2013 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u043b\u0438\u043d\u0438\u0438 \u00ab\u0441\u0442\u0435\u043d\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0441\u0435\u043a\u0430\u044e\u0442 \u043e\u0442 \u043d\u0430\u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0439\u0434\u0451\u043c \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439. \u0422\u0435, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u043c\u0435\u0442\u0438\u043c \u043a\u0430\u043a -1. \u0414\u0440\u0443\u0433\u0438\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0431\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u043b\u0438\u043d\u0438\u0438 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043c \u0442\u0435\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u0441\u0432\u044f\u0437\u0438. \u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0441\u043f\u0438\u0441\u043a\u0438 \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u043c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/h4>\n<p>  \u041f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0433\u0440\u0430\u0444\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c \u0443\u0437\u043b\u044b, \u043f\u0440\u043e\u0445\u043e\u0434\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b. \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0438\u0445 \u043d\u0430 \u0442\u0440\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/p>\n<p>   \u2014 \u0447\u0451\u0440\u043d\u044b\u0435 \u2013 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u044b<br \/>   \u2014 \u0441\u0435\u0440\u044b\u0435 \u2013 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435<br \/>   \u2014 \u0431\u0435\u043b\u044b\u0435 \u2013 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c, \u043d\u0430\u0447\u0430\u0432 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430, \u043e\u0431\u043e\u0439\u0434\u0451\u043c \u0432\u0441\u0435\u0445 \u0435\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439. \u041a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u0430 \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u043a\u0430\u043a \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e, \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u2013 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0431\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u0443\u0437\u043b\u044b.<\/p>\n<p>  \u0412 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">\/\/ \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0443\u0437\u043b\u044b discovered = array();  \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0435\u043b\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 for (i = 0; i &lt; discovered.size(); i++)     discovered[i] = false;  \/\/ \u0441\u0442\u0430\u0440\u0442 endIdx = someEndIndex; start_node_idx = someStartNodeIndex; DFS(start_node_idx);  \/\/ \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c void DFS(nodeIdx) {     if (nodeIdx == endIdx) {         \/\/ \u043a\u043e\u043d\u0435\u0446 \u2013 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c true         discovered[nodeIdx] = true;          return true;     } else if (discovered[nodeIdx]) {         \/\/ \u0435\u0441\u043b\u0438 \u0443\u0436\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439, \u0432\u0435\u0440\u043d\u0443\u0442\u044c false         return false;     } else {         \/\/ \u0438\u043d\u0430\u0447\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u0441\u0435\u0434\u0435\u0439         discovered[nodeIdx] = true;          foreach (neighbour i of nodeIdx) {             result = DFS(i);              if (result) {                 return true; \/\/ \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f             }         }          return false; \/\/ \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u043b\u0438, \u043e\u0442\u0431\u043e\u0439     } } <\/code><\/pre>\n<h4>\u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u042d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0448\u0430\u0433. \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0435\u043d\u0442\u0440 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043b\u0435\u0442\u043a\u0438 (lefttop+rightbot2) \u0438 \u0440\u0438\u0441\u0443\u0435\u043c \u043b\u0438\u043d\u0438\u044e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"perl\">@ARGV = (&quot;\/PATH\/05.svg&quot;);   undef $\/;  $input=(&lt;&gt;);  $idx = 1;  my $rows; my $cols;  # ==================== # \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0438 # ==================== while ($input =~ m\/&lt;title&gt;([0-9]*)\\sby\\s([0-9]*).*\/g) {     ($colCount, $rowCount) = ($1, $2);      $rows = $rowCount;     $cols = $colCount;      print &quot;Rows: $rows Cols: $cols\\n&quot;; }  my @lines; while ($input =~ m\/&lt;line x1=\\&quot;([0-9]+)\\&quot; y1=\\&quot;([0-9]+)\\&quot; x2=\\&quot;([0-9]+)\\&quot; y2=\\&quot;([0-9]+)\\&quot; \\\/&gt;+\/g) {     ($x1,$y1,$x2,$y2) = ($1 \/ 16,$2 \/ 16,$3 \/ 16,$4 \/ 16);      my %H = (         &quot;x1&quot; =&gt; $x1,         &quot;x2&quot; =&gt; $x2,         &quot;y1&quot; =&gt; $y1,         &quot;y2&quot; =&gt; $y2     );      #print &quot;#$idx: X1 : &quot;.$H{&quot;x1&quot;}.&quot; X2: $x2 Y1: $y1 Y2: $y2\\n&quot;;     $idx++;      # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438 \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432     #if ($y2 &gt; $rows + 1) { $rows = $y2 - 1; }     #if ($x2 &gt; $cols + 1) { $cols = $x2 - 1; }      # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u0441\u0442\u0440\u043e\u043a\u0430\u043c     push @lines, \\%H; }  # ================================================ # \u041f\u043e\u0438\u0441\u043a \u0441\u043e\u0441\u0435\u0434\u0435\u0439 # HASH[EL + 1][top|right|bot|left] = value; # ================================================ $elCount = $rows * $cols;  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 my @elements = (); my @corners = (); for (my $i = 0; $i &lt; $elCount; $i++) {     my %H = (         &quot;top&quot; =&gt; ($i + 1) - $cols,         &quot;right&quot; =&gt; ($i + 1) + 1,         &quot;bot&quot; =&gt; ($i + 1) + $cols,         &quot;left&quot; =&gt; ($i + 1) - 1,         &quot;left_top_x&quot; =&gt; 0,         &quot;left_top_y&quot; =&gt; 0,         &quot;right_top_x&quot; =&gt; 0,         &quot;right_top_y&quot; =&gt; 0     );      # \u0421\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b     $row = int($i \/ $cols) + 1;     $col = int($i % $cols) + 1;      # \u0413\u0440\u0430\u043d\u0438\u0446\u044b     if ($H{&quot;top&quot;} &gt; $elCount || $H{&quot;top&quot;} &lt; 1) { $H{&quot;top&quot;} = 0; }     if ($H{&quot;right&quot;} &gt; ($row * $cols) || $H{&quot;right&quot;} &lt; 1) { $H{&quot;right&quot;} = 0; }     if ($H{&quot;bot&quot;} &gt; $elCount || $H{&quot;bot&quot;} &lt; 1) { $H{&quot;bot&quot;} = 0; }     if ($H{&quot;left&quot;} &lt; ((($row  - 1)* $cols) + 1) || $H{&quot;left&quot;} &lt; 1) { $H{&quot;left&quot;} = 0; }      #print &quot;Row: $row Col: $col\\n&quot;;      $mult = 1;     #print &quot;El: #&quot;.($i + 1).&quot; \\n&quot;;      @corners[$i] = {         &quot;left_top_x&quot; =&gt; (($col + 0) * $mult), # \u041b\u0435\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0433\u043e\u043b         &quot;left_top_y&quot; =&gt; (($row + 0) * $mult),         &quot;right_top_x&quot; =&gt; (($col + 1) * $mult), # \u041f\u0440\u0430\u0432\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0443\u0433\u043e\u043b         &quot;right_top_y&quot; =&gt; (($row + 0) * $mult)     };      #print &quot;Top:   (&quot;.(($col + 0) * $mult).&quot;,&quot;.(($row + 0) * $mult).&quot;) -&gt; (&quot;.(($col + 1) * $mult).&quot;,&quot;.(($row + 0) * $mult).&quot;)\\n&quot;;     #print &quot;Bot:   (&quot;.(($col + 0) * $mult).&quot;,&quot;.(($row + 1) * $mult).&quot;) -&gt; (&quot;.(($col + 1) * $mult).&quot;,&quot;.(($row + 1) * $mult).&quot;)\\n&quot;;     #print &quot;Right: (&quot;.(($col + 1) * $mult).&quot;,&quot;.(($row + 0) * $mult).&quot;) -&gt; (&quot;.(($col + 1) * $mult).&quot;,&quot;.(($row + 1) * $mult).&quot;)\\n&quot;;     #print &quot;Left:  (&quot;.(($col + 0) * $mult).&quot;,&quot;.(($row + 0) * $mult).&quot;) -&gt; (&quot;.(($col + 0) * $mult).&quot;,&quot;.(($row + 1) * $mult).&quot;)\\n&quot;;      foreach (@lines) {         #print &quot;(&quot;.$_-&gt;{&quot;x1&quot;}.&quot;,&quot;.$_-&gt;{&quot;y1&quot;}.&quot;) -&gt; (&quot;.$_-&gt;{&quot;x2&quot;}.&quot;,&quot;.$_-&gt;{&quot;y2&quot;}.&quot;)\\n&quot;;          # \u0441\u043e\u0441\u0435\u0434 \u0441\u0432\u0435\u0440\u0445\u0443         if ($_-&gt;{&quot;y1&quot;} == (($row + 0) * $mult) && (($col + 0) * $mult) &gt;= $_-&gt;{&quot;x1&quot;} && (($col + 1) * $mult) &lt;= $_-&gt;{&quot;x2&quot;}) {             # print &quot;No Top Neighbour: &quot;.($i + 1).&quot;\\n&quot;;             undef $H{&quot;top&quot;};         }          # \u0441\u043e\u0441\u0435\u0434 \u0441\u043d\u0438\u0437\u0443         if ($_-&gt;{&quot;y1&quot;} == (($row + 1) * $mult) && (($col + 0) * $mult) &gt;= $_-&gt;{&quot;x1&quot;} && (($col + 1) * $mult) &lt;= $_-&gt;{&quot;x2&quot;}) {             # print &quot;No Bot Neighbour: &quot;.($i + 1).&quot;\\n&quot;;             undef $H{&quot;bot&quot;};         }          # \u0441\u043e\u0441\u0435\u0434 \u0441\u043f\u0440\u0430\u0432\u0430         if ($_-&gt;{&quot;x1&quot;} == (($col + 1) * $mult) && (($row + 0) * $mult) &gt;= $_-&gt;{&quot;y1&quot;} && (($row + 1) * $mult) &lt;= $_-&gt;{&quot;y2&quot;}) {             # print &quot;No Right Neighbour: &quot;.($i + 1).&quot;\\n&quot;;             undef $H{&quot;right&quot;};         }          # \u0441\u043e\u0441\u0435\u0434 \u0441\u043b\u0435\u0432\u0430         if ($_-&gt;{&quot;x1&quot;} == (($col + 0) * $mult) && (($row + 0) * $mult) &gt;= $_-&gt;{&quot;y1&quot;} && (($row + 1) * $mult) &lt;= $_-&gt;{&quot;y2&quot;}) {             # print &quot;No Left Neighbour: &quot;.($i + 1).&quot;\\n&quot;;             undef $H{&quot;left&quot;};         }     }      # print ($i + 1);     # print &quot;:&quot;;     # print &quot;\\t&quot;.$H{&quot;top&quot;} if defined $H{&quot;top&quot;};     # print &quot;\\t&quot;.$H{&quot;right&quot;} if defined $H{&quot;right&quot;};     # print &quot;\\t&quot;.$H{&quot;bot&quot;} if defined $H{&quot;bot&quot;};     # print &quot;\\t&quot;.$H{&quot;left&quot;} if defined $H{&quot;left&quot;};      push @{$elements[$i]}, $H{&quot;top&quot;} if defined $H{&quot;top&quot;};     push @{$elements[$i]}, $H{&quot;right&quot;} if defined $H{&quot;right&quot;};     push @{$elements[$i]}, $H{&quot;bot&quot;} if defined $H{&quot;bot&quot;};     push @{$elements[$i]}, $H{&quot;left&quot;} if defined $H{&quot;left&quot;};      print &quot;&quot;.($i + 1).&quot;:\\t&quot;;     foreach (@{$elements[$i]}) {         print $_.&quot;\\t&quot;;     }      print &quot;\\n&quot;; }  # ================================================ # \u041f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 # ================================================ my $start; my $end; my $newElement; my $oldElement; my @solution;  # 1. \u041d\u0430\u0439\u0434\u0451\u043c \u043d\u0430\u0447\u0430\u043b\u043e \u0438 \u043d\u0430\u0447\u043d\u0451\u043c print &quot;\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0442\u043e\u0447\u043a\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u0438 \u0444\u0438\u043d\u0438\u0448\u0430 \\n&quot;; for ($i = 0; $i &lt; scalar @elements; $i++) {     for ($j = 0; $j &lt; scalar @{$elements[$i]}; $j++) {         if ($start && @{$elements[$i]}[$j] == 0) {             print &quot;End = &quot;.($i + 1).&quot;\\n&quot;;             $end = $i;              last;         }          if (!$start && @{$elements[$i]}[$j] == 0) {             print &quot;Start = &quot;.($i + 1).&quot;\\n&quot;;             $start = $i;         }     } }  # 2. \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u044c my $discovered = ();  # \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c discovered (\u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435) \u0432 false (\u0432\u0441\u0435 \u0443\u0437\u043b\u044b - \u0431\u0435\u043b\u044b\u0435) print &quot;#Nodes: &quot;.(scalar @elements).&quot;\\n\\n&quot;; for ($i = 0; $i &lt; scalar @elements; $i++) {     $discovered[$i] = 0; }  # \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 DFS($start);  sub DFS {     my ($i) = @_;      # \u041a\u043e\u043d\u0435\u0446 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0430 \u2013 \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0432\u0441\u0435, \u043a\u0430\u043a \u043f\u043e\u0441\u0435\u0449\u0451\u043d\u043d\u044b\u0435, \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435     if (($i + 1) == ($end + 1)) {                   # \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c true         push @solution, ($i + 1);          $discovered[$i] = 1;          return 1;     } elsif ($discovered[($_ - 1)] == 1) {  # \u0443\u0436\u0435 \u043f\u043e\u0441\u0435\u0449\u0430\u043b\u0438 - \u0432\u0435\u0440\u043d\u0443\u0442\u044c false         return 0;     } else {                                # \u0438\u043d\u0430\u0447\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c         #print &quot;Node: &quot;.($i + 1).&quot;\\n&quot;;          $discovered[$i] = 1;          # \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439         # \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c true, \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u0435         foreach (@{$elements[$i]}) {             #print &quot;Neighbour: &quot;.($_).&quot;\\n&quot;;              # \u0415\u0441\u043b\u0438 \u0441\u043e\u0441\u0435\u0434 0, \u0432\u0435\u0440\u043d\u0443\u0442\u044c false \u2013 \u044d\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u043e \u0438\u043b\u0438 \u043a\u043e\u043d\u0435\u0446!             if ($_ != 0) {                 $result = DFS($_ - 1);                  if ($result == 1) {                     push @solution, $_;                      return 1;                 }             }         }          # \u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c         return 0;     } }  # \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f push @solution, ($start + 1);  # =============================================================== # \u0412\u044b\u0432\u043e\u0434 # \u0420\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 solutionStack # =============================================================== print &quot;\\nStack: &quot;; foreach (@solution) {     print &quot;$_ &quot;; } print &quot;\\n&quot;;  print &quot;&lt;g fill=\\&quot;none\\&quot; stroke=\\&quot;#FF0000\\&quot; stroke-width=\\&quot;3\\&quot; stroke-linecap=\\&quot;round\\&quot; stroke-linejoin=\\&quot;round\\&quot;&gt;&quot;; for ($i = 0; $i &lt; scalar @solution; $i++) {     $x = ((($corners[$solution[$i] - 1]{&quot;right_top_x&quot;} + $corners[$solution[$i] - 1]{&quot;left_top_x&quot;}) \/ 2) * 16);     $y = ((($corners[$solution[$i] - 1]{&quot;right_top_y&quot;} + $corners[$solution[$i] - 1]{&quot;left_top_y&quot;}) \/ 2) * 16) + 8;      if (($i + 1) &lt; scalar @solution) {         $x2 = ((($corners[$solution[$i + 1] - 1]{&quot;right_top_x&quot;} + $corners[$solution[$i + 1] - 1]{&quot;left_top_x&quot;}) \/ 2) * 16);         $y2 = ((($corners[$solution[$i + 1] - 1]{&quot;right_top_y&quot;} + $corners[$solution[$i + 1] - 1]{&quot;left_top_y&quot;}) \/ 2) * 16) + 8;     }      print &quot;&lt;line x1=\\&quot;$x\\&quot; y1=\\&quot;$y\\&quot; x2=\\&quot;$x2\\&quot; y2=\\&quot;$y2\\&quot; \/&gt;\\n&quot;; } print &quot;&lt;\/g&gt;\\n&quot;; # # print &quot;Found Solution!&quot;; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 svg-\u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"xml\">&lt;g fill=&quot;none&quot; stroke=&quot;#FF0000&quot; stroke-width=&quot;3&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;line x1=&quot;88&quot; y1=&quot;24&quot; x2=&quot;88&quot; y2=&quot;24&quot; \/&gt;     &lt;line x1=&quot;88&quot; y1=&quot;24&quot; x2=&quot;88&quot; y2=&quot;40&quot; \/&gt;     &lt;line x1=&quot;88&quot; y1=&quot;40&quot; x2=&quot;72&quot; y2=&quot;40&quot; \/&gt;     &lt;line x1=&quot;72&quot; y1=&quot;40&quot; x2=&quot;72&quot; y2=&quot;56&quot; \/&gt;     &lt;line x1=&quot;72&quot; y1=&quot;56&quot; x2=&quot;72&quot; y2=&quot;72&quot; \/&gt;     &lt;line x1=&quot;72&quot; y1=&quot;72&quot; x2=&quot;56&quot; y2=&quot;72&quot; \/&gt;     &lt;line x1=&quot;56&quot; y1=&quot;72&quot; x2=&quot;40&quot; y2=&quot;72&quot; \/&gt;     &lt;line x1=&quot;40&quot; y1=&quot;72&quot; x2=&quot;40&quot; y2=&quot;56&quot; \/&gt;     &lt;line x1=&quot;40&quot; y1=&quot;56&quot; x2=&quot;24&quot; y2=&quot;56&quot; \/&gt;     &lt;line x1=&quot;24&quot; y1=&quot;56&quot; x2=&quot;24&quot; y2=&quot;40&quot; \/&gt;     &lt;line x1=&quot;24&quot; y1=&quot;40&quot; x2=&quot;24&quot; y2=&quot;24&quot; \/&gt;     &lt;line x1=&quot;24&quot; y1=&quot;24&quot; x2=&quot;40&quot; y2=&quot;24&quot; \/&gt;     &lt;line x1=&quot;40&quot; y1=&quot;24&quot; x2=&quot;40&quot; y2=&quot;24&quot; \/&gt; &lt;\/g&gt; <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/948\/501\/de8\/948501de81de488cbe6ab56e40880198.png\"\/>     \t<\/p>\n<div class=\"clear\"><\/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\/257251\/\"> http:\/\/habrahabr.ru\/post\/257251\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438 \u0438\u0433\u0440\u0435 \u0432 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u043e\u0442 \u0432\u0445\u043e\u0434\u0430 \u0434\u043e \u0432\u044b\u0445\u043e\u0434\u0430. \u041f\u0443\u0442\u044c-\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0430. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u044b \u0433\u0435\u043d\u0435\u0440\u044f\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<h4>\u0427\u0438\u0442\u0430\u0435\u043c \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442<\/h4>\n<p>  \u041b\u0430\u0431\u0438\u0440\u0438\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SVG, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0435\u0433\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0435\u0440\u0445 \u043d\u0435\u0433\u043e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442\u0430 \u0432 SVG:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?&gt; &lt;!DOCTYPE svg PUBLIC &quot;-\/\/W3C\/\/DTD SVG 1.1\/\/EN&quot; &quot;http:\/\/www.w3.org\/Graphics\/SVG\/1.1\/DTD\/svg11.dtd&quot;&gt; &lt;svg width=&quot;112&quot; height=&quot;96&quot; version=&quot;1.1&quot; xmlns=&quot;http:\/\/www.w3.org\/2000\/svg&quot;&gt;   &lt;rect width=&quot;112&quot; height=&quot;96&quot; fill=&quot;white&quot; stroke=&quot;none&quot; \/&gt;   &lt;title&gt;5 by 4 orthogonal maze&lt;\/title&gt;   &lt;g fill=&quot;none&quot; stroke=&quot;#000000&quot; stroke-width=&quot;3&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;     &lt;line x1=&quot;16&quot; y1=&quot;16&quot; x2=&quot;32&quot; y2=&quot;16&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;16&quot; x2=&quot;80&quot; y2=&quot;16&quot; \/&gt;     &lt;line x1=&quot;16&quot; y1=&quot;80&quot; x2=&quot;96&quot; y2=&quot;80&quot; \/&gt;     &lt;line x1=&quot;16&quot; y1=&quot;16&quot; x2=&quot;16&quot; y2=&quot;80&quot; \/&gt;     &lt;line x1=&quot;96&quot; y1=&quot;16&quot; x2=&quot;96&quot; y2=&quot;80&quot; \/&gt;     &lt;line x1=&quot;64&quot; y1=&quot;16&quot; x2=&quot;64&quot; y2=&quot;32&quot; \/&gt;     &lt;line x1=&quot;32&quot; y1=&quot;32&quot; x2=&quot;32&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;32&quot; y1=&quot;32&quot; x2=&quot;48&quot; y2=&quot;32&quot; \/&gt;     &lt;line x1=&quot;64&quot; y1=&quot;32&quot; x2=&quot;64&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;64&quot; y1=&quot;32&quot; x2=&quot;80&quot; y2=&quot;32&quot; \/&gt;     &lt;line x1=&quot;32&quot; y1=&quot;48&quot; x2=&quot;48&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;48&quot; x2=&quot;48&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;48&quot; x2=&quot;64&quot; y2=&quot;48&quot; \/&gt;     &lt;line x1=&quot;80&quot; y1=&quot;48&quot; x2=&quot;80&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;16&quot; y1=&quot;64&quot; x2=&quot;32&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;48&quot; y1=&quot;64&quot; x2=&quot;64&quot; y2=&quot;64&quot; \/&gt;     &lt;line x1=&quot;80&quot; y1=&quot;64&quot; x2=&quot;80&quot; y2=&quot;80&quot; \/&gt;   &lt;\/g&gt;    &lt;g fill=&quot;black&quot; stroke=&quot;none&quot; stroke-width=&quot;1&quot;&gt;     &lt;text x=&quot;24&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;1&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;2&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;3&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;4&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;26&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;5&lt;\/text&gt;     &lt;text x=&quot;24&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;6&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;7&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;8&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;9&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;42&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;10&lt;\/text&gt;     &lt;text x=&quot;24&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;11&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;12&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;13&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;14&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;58&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;15&lt;\/text&gt;     &lt;text x=&quot;24&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;16&lt;\/text&gt;     &lt;text x=&quot;40&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;17&lt;\/text&gt;     &lt;text x=&quot;56&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;18&lt;\/text&gt;     &lt;text x=&quot;72&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;19&lt;\/text&gt;     &lt;text x=&quot;88&quot; y=&quot;74&quot; text-anchor=&quot;middle&quot; style=&quot;font-family:Arial Narrow; font-size: xx-small;&quot;&gt;20&lt;\/text&gt;   &lt;\/g&gt; &lt;\/svg&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/230\/b16\/b2f\/230b16b2f426458099389b899dcfdcdb.png\"\/><\/p>\n<p>  \u0424\u0430\u0439\u043b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043a\u0430\u043c\u0438 \u2013 \u043e\u0434\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u2013 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u0438\u043d\u0438\u0439.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-256560","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256560","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=256560"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256560\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}