{"id":7756,"date":"2009-04-09T11:16:05","date_gmt":"2009-04-09T08:16:05","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=7756"},"modified":"2009-04-09T11:16:05","modified_gmt":"2009-04-09T08:16:05","slug":"%d1%84%d1%83%d0%bd%d0%ba%d1%86%d0%b8%d1%8f-%d1%80%d0%b8%d1%81%d1%83%d1%8e%d1%89%d0%b0%d1%8f-%d1%8d%d0%b4%d1%81","status":"publish","type":"post","link":"http:\/\/studentpmr.ru\/?p=7756","title":{"rendered":"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0438\u0441\u0443\u044e\u0449\u0430\u044f \u042d\u0414\u0421"},"content":{"rendered":"<p>void eds(int x1,int y1,int x2,int y2){<\/p>\n<p>int x3,y3;<\/p>\n<p>switch(pozition(x1,y1,x2,y2)){<\/p>\n<p>case 1:<\/p>\n<p> <!--more-->  <\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1;<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>line(x1,y1,x3-2,y1);<\/p>\n<p>line(x3+1,y2,x2,y2);<\/p>\n<p>line(x3-2,y1-3,x3-2,y1+3);<\/p>\n<p>line(x3+1,y2-7,x3+1,y2+7);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y2=y1;<\/p>\n<p>line(x2,y2,x3-2,y1);<\/p>\n<p>line(x3+1,y2,x1,y1);<\/p>\n<p>line(x3-2,y1-7,x3-2,y1+7);<\/p>\n<p>line(x3+1,y2-3,x3+1,y2+3);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 2:<\/p>\n<p>if(y1&lt;y2){<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x1,y3-2);<\/p>\n<p>line(x2,y3+1,x2,y2);<\/p>\n<p>line(x1-3,y3-2,x1+3,y3-2);<\/p>\n<p>line(x1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2)\/2;<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>line(x1,y1,x3+1,y3+1);<\/p>\n<p>line(x3-1,y3-1,x2,y2);<\/p>\n<p>line(x3+3,y3-1,x3-1,y3+3);<\/p>\n<p>line(x3+4,y3-6,x3-6,y3+4);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0438\u0441\u0443\u044e\u0449\u0430\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043b\u0430\u043c\u043f\u0443<\/p>\n<p>void lampochka(int x1,int y1,int x2,int y2){<\/p>\n<p>int x3,y3;<\/p>\n<p>switch(pozition(x1,y1,x2,y2)){<\/p>\n<p>case 1:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1;<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>line(x1,y1,x3-7,y1);<\/p>\n<p>line(x3+7,y2,x2,y2);<\/p>\n<p>circle(x3,y1,7);<\/p>\n<p>line(x3-3,y1-3,x3+3,y1+3);<\/p>\n<p>line(x3+3,y1-3,x3-3,y1+3);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y2=y1;<\/p>\n<p>line(x2,y2,x3-7,y2);<\/p>\n<p>line(x3+7,y1,x1,y1);<\/p>\n<p>circle(x3,y2,7);<\/p>\n<p>line(x3-3,y2-3,x3+3,y2+3);<\/p>\n<p>line(x3+3,y2-3,x3-3,y2+3);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 2:<\/p>\n<p>if(y1&lt;y2){<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x1,y3-7);<\/p>\n<p>line(x1,y3+7,x2,y2);<\/p>\n<p>circle(x1,y3,7);<\/p>\n<p>line(x1-3,y3-3,x1+3,y3+3);<\/p>\n<p>line(x1+3,y3-3,x1-3,y3+3);<\/p>\n<p>}<\/p>\n<p>if(y1&gt;y2){<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x1,y3+7);<\/p>\n<p>line(x2,y3-7,x2,y2);<\/p>\n<p>circle(x1,y3,7);<\/p>\n<p>line(x1-3,y3-3,x1+3,y3+3);<\/p>\n<p>line(x1+3,y3-3,x1-3,y3+3);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 3:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1-(x2-x1);<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x3-5,y3+5);<\/p>\n<p>line(x3+5,y3-5,x2,y2);<\/p>\n<p>circle(x3,y3,7);<\/p>\n<p>line(x3-3,y3-3,x3+3,y3+3);<\/p>\n<p>line(x3+3,y3-3,x3-3,y3+3);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1+(x1-x2);<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x3+5,y3-5);<\/p>\n<p>line(x3-5,y3+5,x2,y2);<\/p>\n<p>circle(x3,y3,7);<\/p>\n<p>line(x3-3,y3-3,x3+3,y3+3);<\/p>\n<p>line(x3+3,y3-3,x3-3,y3+3);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 4:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1+(x2-x1);<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x3-5,y3-5);<\/p>\n<p>line(x3+5,y3+5,x2,y2);<\/p>\n<p>circle(x3,y3,7);<\/p>\n<p>line(x3-3,y3-3,x3+3,y3+3);<\/p>\n<p>line(x3+3,y3-3,x3-3,y3+3);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1-(x1-x2);<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>line(x1,y1,x3+5,y3+5);<\/p>\n<p>line(x3-5,y3-5,x2,y2);<\/p>\n<p>circle(x3,y3,7);<\/p>\n<p>line(x3-3,y3-3,x3+3,y3+3);<\/p>\n<p>line(x3+3,y3-3,x3-3,y3+3);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>void eds(int x1,int y1,int x2,int y2){ int x3,y3; switch(pozition(x1,y1,x2,y2)){ case 1:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[],"_links":{"self":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/7756"}],"collection":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7756"}],"version-history":[{"count":0,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/7756\/revisions"}],"wp:attachment":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7756"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}