{"id":3714,"date":"2018-10-04T18:41:46","date_gmt":"2018-10-04T15:41:46","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3714"},"modified":"2018-11-19T21:35:38","modified_gmt":"2018-11-19T18:35:38","slug":"e-olymp-130-%d0%bf%d1%80%d1%8f%d0%bc%d0%be%d1%83%d0%b3%d0%be%d0%bb%d1%8c%d0%bd%d0%b8%d0%ba","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3714","title":{"rendered":"e-olymp 130. \u041f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0417\u0430\u0434\u0430\u043d\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0440\u0451\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b.<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0448\u0435\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0440\u0451\u0445 \u0442\u043e\u0447\u0435\u043a.<\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0414\u0432\u0430 \u0447\u0438\u0441\u043b\u0430, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0412\u0441\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e [latex]100[\/latex].<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table>\n<tbody>\n<tr>\n<td><strong>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong><\/td>\n<td><strong>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong><\/td>\n<\/tr>\n<tr>\n<td>[latex]0[\/latex] [latex]0[\/latex] [latex]0[\/latex] [latex]1[\/latex] [latex]2[\/latex] [latex]1[\/latex]<\/td>\n<td>[latex]2[\/latex] [latex]0[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]1\\, 4\\, 4\\, 0\\, 0\\, 2[\/latex]<\/td>\n<td>[latex]5\\, 2[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]-100[\/latex] [latex]-100[\/latex]  [latex]100[\/latex] [latex]100[\/latex] [latex]100[\/latex] [latex]-100[\/latex]<\/td>\n<td>[latex]-100[\/latex] [latex]100[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]2[\/latex] [latex]-1[\/latex] [latex]3[\/latex] [latex]1[\/latex] [latex]-2[\/latex] [latex]1[\/latex]<\/td>\n<td>[latex]-1[\/latex] [latex]3[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]8\\, 0\\, 1\\, 6\\, 0\\, 4[\/latex]<\/td>\n<td>[latex]9\\, 2[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h1>\n<pre class=\"lang:java decode:true \" title=\"e-olimp 130 Rectangle\">import java.util.Scanner;\r\n\r\npublic class Main {\r\n\tpublic static void main (String[] args) {\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tint x1 = scanner.nextInt();\r\n\t\tint y1 = scanner.nextInt();\r\n\t\tint x2 = scanner.nextInt();\r\n\t\tint y2 = scanner.nextInt();\r\n\t\tint x3 = scanner.nextInt();\r\n\t\tint y3 = scanner.nextInt();\r\n\t\tif ((x2-x1)*(x3-x1)+(y2-y1)*(y3-y1)==0) {\r\n\t\t\tSystem.out.println((x2+x3-x1)+\" \"+(y2+y3-y1));\r\n\t\t}\r\n\t\telse if ((x2-x1)*(x3-x2)+(y2-y1)*(y3-y2)==0) {\r\n\t\t\tSystem.out.println((x1+x3-x2)+\" \"+(y1+y3-y2));\r\n\t\t}\r\n\t\telse if ((x3-x1)*(x3-x2)+(y3-y1)*(y3-y2)==0) {\r\n\t\t\tSystem.out.println((x1+x2-x3)+\" \"+(y1+y2-y3));\r\n\t\t}   \r\n\t}\r\n}<\/pre>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h1>\n<div id=\"attachment_19996\" style=\"width: 260px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-19996\" src=\"http:\/\/cpp.mazurok.com\/wp-content\/uploads\/2017\/12\/rectangle-2.svg\" alt=\"\u041f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\" width=\"250\" height=\"190\" class=\"size-thumbnail wp-image-19996\" \/><p id=\"caption-attachment-19996\" class=\"wp-caption-text\">\u041f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a<\/p><\/div>\n\u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0432\u043d\u044b \u0441\u0443\u043c\u043c\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043f\u0440\u0438\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043c\u0438\u043d\u0443\u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u0442. \u0435: [latex]x_4=x_1+x_3-x_2[\/latex] \u0438 [latex]y_4=y_1+y_3-y_2[\/latex]. \u041d\u043e \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a\u0430\u044f \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439, \u0430 \u043a\u0430\u043a\u0438\u0435 &#8212; \u043f\u0440\u0438\u043b\u0435\u0436\u0430\u0449\u0438\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0430 \u0444\u0438\u0433\u0443\u0440\u0430 \u044d\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u0442\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438 \u0443\u0433\u043b\u0435 [latex]90^{\\circ}[\/latex]. \u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0434\u0430\u0435\u0442 [latex]0[\/latex]. \u041f\u0435\u0440\u0435\u0431\u0440\u0430\u0432 \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u0443 \u043f\u0440\u0438 \u0443\u0433\u043b\u0435 [latex]90^{\\circ}[\/latex]. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0432\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043b\u0435\u0436\u0430\u0449\u0438\u043c\u0438. \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435, \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435. <\/p>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p><a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/130\" rel=\"noopener\" target=\"_blank\">\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 e-olymp<\/a><br \/>\n<a href=\"https:\/\/ideone.com\/cfWOUJ\" rel=\"noopener\" target=\"_blank\">\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/a>     <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0417\u0430\u0434\u0430\u043d\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0440\u0451\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0448\u0435\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0440\u0451\u0445 \u0442\u043e\u0447\u0435\u043a. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0414\u0432\u0430 \u0447\u0438\u0441\u043b\u0430, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0412\u0441\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e [latex]100[\/latex]. \u0422\u0435\u0441\u0442\u044b \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 [latex]0[\/latex] [latex]0[\/latex] [latex]0[\/latex] [latex]1[\/latex] [latex]2[\/latex] [latex]1[\/latex] [latex]2[\/latex] &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3714\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":122,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[399,196,400,401,158,202,402],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3714"}],"collection":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/users\/122"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3714"}],"version-history":[{"count":2,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3714\/revisions"}],"predecessor-version":[{"id":3716,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3714\/revisions\/3716"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}