{"id":3754,"date":"2018-12-25T22:53:52","date_gmt":"2018-12-25T19:53:52","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3754"},"modified":"2018-12-27T17:59:44","modified_gmt":"2018-12-27T14:59:44","slug":"e-olimp-57-%d0%b1%d0%b0%d0%b1%d0%be%d1%87%d0%ba%d0%b0-%d1%81%d0%b0%d0%bd%d0%b8%d1%82%d0%b0%d1%80","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3754","title":{"rendered":"e-olimp 57. \u0411\u0430\u0431\u043e\u0447\u043a\u0430-\u0441\u0430\u043d\u0438\u0442\u0430\u0440"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<div id=\"attachment_19177\" class=\"wp-caption alignright\">\n<p><a href=\"https:\/\/i2.wp.com\/cpp.mazurok.com\/wp-content\/uploads\/2017\/11\/1256245940-1.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-19177\" style=\"border: none;max-width: 98%;background: #120f10;height: auto;width: auto;margin: 2.51563px auto 0px\" src=\"https:\/\/i2.wp.com\/cpp.mazurok.com\/wp-content\/uploads\/2017\/11\/1256245940-1.gif?resize=200%2C100\" alt=\"e-olimp 57. \u0411\u0430\u0431\u043e\u0447\u043a\u0430-\u0441\u0430\u043d\u0438\u0442\u0430\u0440\" width=\"200\" height=\"100\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">e-olimp 57. \u0411\u0430\u0431\u043e\u0447\u043a\u0430-\u0441\u0430\u043d\u0438\u0442\u0430\u0440<\/p>\n<\/div>\n<p>\u0428\u043a\u043e\u043b\u044c\u043d\u0438\u043a\u0438, \u0438\u0434\u044f \u0438\u0437 \u0434\u043e\u043c\u0443 \u0432 \u0448\u043a\u043e\u043b\u0443 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u2014 \u0441\u043e \u0448\u043a\u043e\u043b\u044b \u0434\u043e\u043c\u043e\u0439, \u043b\u044e\u0431\u044f\u0442 \u043a\u0443\u0448\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0435\u0442\u044b. \u041d\u043e, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u044d\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u2013 \u0434\u0435\u0442\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u043c \u0434\u0432\u043e\u0440\u0435.<br \/>\n\u041c\u0443\u0440\u0437\u0438\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0438\u043b \u0437\u0430 \u0447\u0438\u0441\u0442\u043e\u0442\u043e\u0439 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0432\u043e\u0440\u0430 \u0438 \u0435\u043c\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u0438 \u0431\u0430\u0431\u043e\u0447\u043a\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u044b\u0435 \u0437\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0438\u043c. \u0411\u0430\u0431\u043e\u0447\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u0440\u044b\u043b\u044b\u0448\u043a\u0438 \u043a\u0430\u043a \u043b\u0438\u043d\u0437\u044b, \u043f\u0440\u0438\u0447\u0435\u043c \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0444\u043e\u043a\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u0417\u0430\u043c\u0435\u0442\u0438\u0432 \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043e\u0442 \u043a\u043e\u043d\u0444\u0435\u0442\u043a\u0438, \u043b\u0435\u0436\u0430\u0432\u0448\u0443\u044e \u043d\u0430 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u043c \u0434\u0432\u043e\u0440\u0435 \u0432 \u0442\u043e\u0447\u043a\u0435 \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 $X_{1}$ $Y_{2}$, \u0431\u0430\u0431\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u043b\u0435\u0442\u0430\u043b\u0430 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438\u00a0$X_{2}$,\u00a0$Y_{2}$,\u00a0$Z_{2}$, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u043f\u0443\u0442\u0438 \u0441\u043e\u043b\u043d\u0435\u0447\u043d\u044b\u0445 \u043b\u0443\u0447\u0435\u0439 \u043a \u043e\u0431\u0435\u0440\u0442\u043a\u0435 \u0438, \u0438\u0437\u043c\u0435\u043d\u044f\u044f \u0444\u043e\u043a\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u043a\u0440\u044b\u043b\u044b\u0448\u0435\u043a-\u043b\u0438\u043d\u0437, \u0441\u0436\u0438\u0433\u0430\u043b\u0438 \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043e\u0442 \u043a\u043e\u043d\u0444\u0435\u0442\u044b.<br \/>\n\u041a\u0430\u043a\u0443\u044e \u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0438\u043b\u0443\u00a0$D$\u00a0\u0438\u043c\u0435\u043b\u0438 \u043a\u0440\u044b\u043b\u044b\u0448\u043a\u0438-\u043b\u0438\u043d\u0437\u044b \u0431\u0430\u0431\u043e\u0447\u043a\u0438 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442?<\/p>\n<h2>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 2 \u0447\u0438\u0441\u043b\u0430: \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b $X_{1}$, $Y_{1}$ \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043e\u0442 \u043a\u043e\u043d\u0444\u0435\u0442\u043a\u0438. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u2013 3 \u0447\u0438\u0441\u043b\u0430: \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b $X_{2}$, $Y_{2}$, $Z_{2}$ \u0431\u0430\u0431\u043e\u0447\u043a\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0436\u0438\u0433\u0430\u043d\u0438\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0438.<br \/>\n\u0412\u0441\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \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 1000.<\/p>\n<h2>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2013 \u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u043b\u0430 \u043a\u0440\u044b\u043b\u044b\u0448\u0435\u043a-\u043b\u0438\u043d\u0437\u00a0D, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e 3-\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0437\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0439.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<table>\n<tbody>\n<tr>\n<td>\u0412\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042b\u0415<\/td>\n<td>\u0412\u042b\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042b\u0415<\/td>\n<\/tr>\n<tr>\n<td>10 20<br \/>\n10 20 100<\/td>\n<td>0.010<\/td>\n<\/tr>\n<tr>\n<td>600 400<br \/>\n300 867 409<\/td>\n<td>0.001<\/td>\n<\/tr>\n<tr>\n<td>30 50<br \/>\n1000 1000 1000<\/td>\n<td>0.001<\/td>\n<\/tr>\n<tr>\n<td>60 21<br \/>\n11 44 -7<\/td>\n<td>0.018<\/td>\n<\/tr>\n<\/table>\n<h2>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\n<pre class=\"lang:java decode:true \">\r\nimport java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\nimport java.util.Scanner;\r\n\r\nclass Main\r\n{\r\n\tpublic static void main (String[] args) throws java.lang.Exception\r\n\t{\r\n\t\tdouble x1, y1, z1, x, y, S;\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tx = in.nextInt();\r\n\t\ty = in.nextInt();\r\n\t\tx1 = in.nextInt();\r\n\t\ty1 = in.nextInt();\r\n\t\tz1 = in.nextInt();\r\n\t\tS = Math.sqrt((x1 - x)*(x1 - x) + (y1-y)*(y1-y) + z1*z1);\r\n\t\tSystem.out.printf(\"%.3f\", 1\/S);\r\n\t}\r\n}<\/pre>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>$F=\\sqrt{(x-x_{1})^{2} + (y-y_{1})^{2} + z^{2}}$ \u2014 \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430. \u041f\u043e \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0444\u043e\u043a\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043a\u0440\u044b\u043b\u044c\u044f\u043c\u0438-\u043b\u0438\u043d\u0437\u0430\u043c\u0438 \u0438 \u0431\u0443\u043c\u0430\u0436\u043a\u043e\u0439. \u041e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u043b\u0430 \u043b\u0438\u043d\u0437\u044b $\\frac{1}{F}$, \u0433\u0434\u0435 $F$ \u2014 \u0444\u043e\u043a\u0443\u0441\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<pre class=\"start-line:18 lang:java decode:true \">System.out.printf(\"%.3f\", 1\/S);<\/pre>\n<p>\u042d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043a\u043e\u0434\u0430 \u043c\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0438\u043b\u0443 \u043b\u0438\u043d\u0437\u044b \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u0442\u0440\u0435\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439.<br \/>\n\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/57\">e-olimp<\/a><br \/>\n\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f <a href=\"https:\/\/ideone.com\/vgZsZd\">ideon<\/a><br \/>\n<\/tbody>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 e-olimp 57. \u0411\u0430\u0431\u043e\u0447\u043a\u0430-\u0441\u0430\u043d\u0438\u0442\u0430\u0440 \u0428\u043a\u043e\u043b\u044c\u043d\u0438\u043a\u0438, \u0438\u0434\u044f \u0438\u0437 \u0434\u043e\u043c\u0443 \u0432 \u0448\u043a\u043e\u043b\u0443 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u2014 \u0441\u043e \u0448\u043a\u043e\u043b\u044b \u0434\u043e\u043c\u043e\u0439, \u043b\u044e\u0431\u044f\u0442 \u043a\u0443\u0448\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0435\u0442\u044b. \u041d\u043e, \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u044d\u0442\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u2013 \u0434\u0435\u0442\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u043c \u0434\u0432\u043e\u0440\u0435. \u041c\u0443\u0440\u0437\u0438\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0438\u043b \u0437\u0430 \u0447\u0438\u0441\u0442\u043e\u0442\u043e\u0439 \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0432\u043e\u0440\u0430 \u0438 \u0435\u043c\u0443 \u0432 \u044d\u0442\u043e\u043c \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u0438 \u0431\u0430\u0431\u043e\u0447\u043a\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u044b\u0435 \u0437\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0435 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3754\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":116,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[216,374,69],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3754"}],"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\/116"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3754"}],"version-history":[{"count":10,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3754\/revisions"}],"predecessor-version":[{"id":4479,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3754\/revisions\/4479"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}