{"id":4165,"date":"2018-12-17T14:21:05","date_gmt":"2018-12-17T11:21:05","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4165"},"modified":"2018-12-25T20:45:10","modified_gmt":"2018-12-25T17:45:10","slug":"e-olymp-76-%d0%bd%d0%be%d0%b2%d1%8b%d0%b9-%d1%88%d0%ba%d0%b0%d1%84","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=4165","title":{"rendered":"e-olymp 76. \u041d\u043e\u0432\u044b\u0439 \u0448\u043a\u0430\u0444"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3552 alignright\" src=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/new-case.jpg\" alt=\"New Case\" width=\"212\" height=\"123\" \/>\u0417\u0430\u0434\u0430\u043d\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0439 \u0434\u0432\u0435\u0440\u0438 $a$, $b$ \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0448\u043a\u0430\u0444\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0435\u043f\u0438\u043f\u0435\u0434\u0430 $x$, $y$, $z$. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u043e\u043d\u0435\u0441\u0442\u0438 \u0448\u043a\u0430\u0444 \u0441\u043a\u0432\u043e\u0437\u044c \u0434\u0432\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u043d\u043e\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u043e\u0435 \u0440\u0435\u0431\u0440\u043e \u0448\u043a\u0430\u0444\u0430 \u0431\u044b\u043b\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0434\u0432\u0435\u0440\u0438.<\/p>\n<h2>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u041f\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b $a$, $b$, $x$, $y$, $z$ ( $0\\;\\lt\\;a,\\;b,\\;x,\\;y,\\;z\\;\\lt\\;10$ ).<\/p>\n<h2>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0412\u044b\u0432\u0435\u0441\u0442\u0438 $1$, \u0435\u0441\u043b\u0438 \u0448\u043a\u0430\u0444 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u043f\u0440\u043e\u043d\u0435\u0441\u0442\u0438 \u0441\u043a\u0432\u043e\u0437\u044c \u0434\u0432\u0435\u0440\u044c \u0438 $0$ \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<table style=\"border-collapse: collapse;width: 61.6849%;height: 198px\" border=\"1\">\n<tbody>\n<tr style=\"height: 22px\">\n<td style=\"height: 22px;text-align: center;width: 28.1786%\">\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td style=\"height: 22px;text-align: center;width: 33.387%\">\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$5\\;7\\;4\\;6\\;8$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$1$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$1\\;4\\;2\\;3\\;6$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$0$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$2.9\\;6.7\\;5.1\\;3.7\\;1.0$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$1$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$4\\;6\\;6\\;4\\;3$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$1$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$1.5\\;8\\;9.9\\;2\\;7.5$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$0$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$2\\;2\\;2\\;2\\;2$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$0$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$2\\;3\\;7\\;8\\;8$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$0$<\/td>\n<\/tr>\n<tr style=\"height: 22px\">\n<td style=\"width: 28.1786%;height: 22px;text-align: center\">$5\\;6\\;2\\;4\\;3.5$<\/td>\n<td style=\"width: 33.387%;height: 22px;text-align: center\">$1$<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\n<pre class=\"lang:java decode:true \" title=\"e-olymp 76. \u041d\u043e\u0432\u044b\u0439 \u0448\u043a\u0430\u0444\">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\tdouble a = scanner.nextDouble();\r\n\t\tdouble b = scanner.nextDouble();\r\n\t\tdouble x = scanner.nextDouble();\r\n\t\tdouble y = scanner.nextDouble();\r\n\t\tdouble z = scanner.nextDouble();\r\n\t\tif ((x &lt; a &amp;&amp; y &lt; b) || (y &lt; a &amp;&amp; x &lt; b) || (y &lt; a &amp;&amp; z &lt; b) || (z &lt; a &amp;&amp; y &lt; b) || (x &lt; a &amp;&amp; z &lt; b) || (z &lt; a &amp;&amp; x &lt; b)) {\r\n\t\t\tSystem.out.print(1);\r\n\t\t} else {\r\n\t\t\tSystem.out.print(0);\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0428\u043a\u0430\u0444 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043d\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0435\u0440\u044c \u0442\u043e\u0433\u0434\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0448\u0438\u0440\u0438\u043d\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u0435\u0433\u043e \u0433\u0440\u0430\u043d\u0438, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u0432\u0435\u0440\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043c\u0443, \u043c\u0435\u043d\u044c\u0448\u0435 \u0448\u0438\u0440\u0438\u043d\u044b \u0438 \u0432\u044b\u0441\u043e\u0442\u044b \u0434\u0432\u0435\u0440\u0438.<\/p>\n<p>\u0418\u043c\u0435\u0435\u043c \u0448\u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0448\u0438\u0440\u0438\u043d\u044b \u0438 \u0432\u044b\u0441\u043e\u0442\u044b \u0433\u0440\u0430\u043d\u0438 \u0448\u043a\u0430\u0444\u0430 \u2014 $(x,y)$, $(y,x)$, $(y,z)$, $(z,y)$, $(x,z)$, $(z,x)$<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0438\u0445 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 \u0434\u0432\u0435\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u043e\u043d\u0435\u0441\u0442\u0438 \u0448\u043a\u0430\u0444 \u0441\u043a\u0432\u043e\u0437\u044c \u0434\u0432\u0435\u0440\u044c.<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/76\" target=\"_blank\" rel=\"noopener\">e-olymp<\/a><br \/>\n\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/ideone.com\/vxlhJv\" target=\"_blank\" rel=\"noopener\">ideone<\/a><br \/>\n\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/submissions\/4913405\" target=\"_blank\" rel=\"noopener\">e-olymp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0417\u0430\u0434\u0430\u043d\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0439 \u0434\u0432\u0435\u0440\u0438 $a$, $b$ \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0448\u043a\u0430\u0444\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u0440\u043c\u0443 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0435\u043f\u0438\u043f\u0435\u0434\u0430 $x$, $y$, $z$. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u043e\u043d\u0435\u0441\u0442\u0438 \u0448\u043a\u0430\u0444 \u0441\u043a\u0432\u043e\u0437\u044c \u0434\u0432\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u043d\u043e\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u043e\u0435 \u0440\u0435\u0431\u0440\u043e \u0448\u043a\u0430\u0444\u0430 \u0431\u044b\u043b\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0434\u0432\u0435\u0440\u0438. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u041f\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b $a$, $b$, $x$, $y$, $z$ ( $0\\;\\lt\\;a,\\;b,\\;x,\\;y,\\;z\\;\\lt\\;10$ ). \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0432\u0435\u0441\u0442\u0438 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4165\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":117,"featured_media":4166,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[230,196,554,555],"jetpack_featured_media_url":"https:\/\/java.mazurok.com\/wp-content\/uploads\/new-case.jpg","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4165"}],"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\/117"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4165"}],"version-history":[{"count":12,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4165\/revisions"}],"predecessor-version":[{"id":4178,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4165\/revisions\/4178"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/media\/4166"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}