{"id":4562,"date":"2018-12-27T21:09:04","date_gmt":"2018-12-27T18:09:04","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4562"},"modified":"2019-01-29T22:21:26","modified_gmt":"2019-01-29T19:21:26","slug":"e-olymp-143-%d1%82%d0%be%d1%87%d0%ba%d0%b0-%d0%b8-%d1%82%d1%80%d0%b5%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=4562","title":{"rendered":"e-olymp 143. \u0422\u043e\u0447\u043a\u0430 \u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a"},"content":{"rendered":"<h1>\u0422\u043e\u0447\u043a\u0430 \u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a<\/h1>\n<p>\u041f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043b\u0438 \u0442\u043e\u0447\u043a\u0430 [latex]O[\/latex] \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0443 [latex]ABC[\/latex]?<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u0435\u043a [latex]O, A, B, C[\/latex]. \u0427\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 100.<\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412\u044b\u0432\u0435\u0441\u0442\u0438 1, \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0430 [latex]O[\/latex] \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0443 [latex]ABC[\/latex] \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<table>\n<tbody>\n<tr>\n<th>\u2116<\/th>\n<th>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<th>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<\/tr>\n<tr>\n<th>1<\/th>\n<th>2 6 -9 3 8 1 5 11<\/th>\n<th>1<\/th>\n<\/tr>\n<tr>\n<th>2<\/th>\n<th>-13 10 -12 5 99 80 17 13<\/th>\n<th>0<\/th>\n<\/tr>\n<tr>\n<th>3<\/th>\n<th>98 -50 -87 7 5 3 23 17<\/th>\n<th>0<\/th>\n<\/tr>\n<tr>\n<th>4<\/th>\n<th>5 15 7 12 5 3 2 54<\/th>\n<th>1<\/th>\n<\/tr>\n<tr>\n<th>5<\/th>\n<th>2 2 3 1 1 3 9 11<\/th>\n<th>1<\/th>\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 \">import java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\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\tScanner scan = new Scanner(System.in);\r\n\t\tdouble x0 = scan.nextDouble();\r\n\t\tdouble y0 = scan.nextDouble();\r\n\t\tdouble x1 = scan.nextDouble();\r\n\t\tdouble y1 = scan.nextDouble();\r\n\t\tdouble x2 = scan.nextDouble();\r\n\t\tdouble y2 = scan.nextDouble();\r\n\t\tdouble x3 = scan.nextDouble();\r\n\t\tdouble y3 = scan.nextDouble();\r\n\t\tdouble z1,z2,z3;\r\n\t\tz1 = (x1 - x0) * (y2 - y1) - (x2 - x1) * (y1 - y0);\r\n\t\tz2 = (x2 - x0) * (y3 - y2) - (x3 - x2) * (y2 - y0);\r\n\t\tz3 = (x3 - x0) * (y1 - y3) - (x1 - x3) * (y3 - y0);\r\n\t\tif ((z1&gt;=0 &amp;&amp; z2&gt;=0 &amp;&amp; z3&gt;=0) || (z1&lt;=0 &amp;&amp; z2&lt;=0 &amp;&amp; z3&lt;=0)) System.out.println(\"1\");\r\n\t\telse System.out.println(\"0\");\r\n\t}\r\n}<\/pre>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h1>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0447\u043a\u0430 [latex]M[\/latex] \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u043b\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0443, \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 [latex]D([\/latex]$x_{1}$,$y_{1}$[latex]), [\/latex] [latex]E([\/latex]$x_{2}$,$y_{2}$[latex]), [\/latex][latex]F([\/latex]$x_{3}$,$y_{3}$[latex]), [\/latex] \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 (\u043a\u043e\u0441\u043e\u0435) \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043b\u0438\u0431\u043e \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e \u0438\u043b\u0438 \u0436\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u043b\u0438\u0431\u043e \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044f. \u041f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u0441\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432.<br \/>\n[$\\overline{DE}$,$\\overline{MD}$]=($x_{1}$-$x_{0}$) $\\cdot$ ($y_{2}$-$y_{1}$)-($x_{2}$-$x_{1}$) $\\cdot$ ($y_{1}$-$y_{0}$)<br \/>\n[$\\overline{EF}$,$\\overline{ME}$]=($x_{2}$-$x_{0}$) $\\cdot$ ($y_{3}$-$y_{2}$)-($x_{3}$-$x_{2}$) $\\cdot$ ($y_{2}$-$y_{0}$)<br \/>\n[$\\overline{FD}$,$\\overline{MF}$]=($x_{3}$-$x_{0}$) $\\cdot$ ($y_{1}$-$y_{3}$)-($x_{1}$-$x_{3}$) $\\cdot$ ($y_{3}$-$y_{0}$)<br \/>\n\u0415\u0441\u043b\u0438 [$\\overline{DE}$,$\\overline{MD}$], [$\\overline{EF}$,$\\overline{ME}$] \u0438 [$\\overline{FD}$,$\\overline{MF}$] \u0431\u043e\u043b\u044c\u0448\u0435 \u043b\u0438\u0431\u043e \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e \u0438\u043b\u0438 \u0436\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u043b\u0438\u0431\u043e \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044f, \u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0443.<\/p>\n<p>&nbsp;<\/p>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p><a href=\"https:\/\/ideone.com\/gALzs3\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 Ideone<\/a><br \/>\n<a href=\"https:\/\/www.e-olymp.com\/ru\/submissions\/4945258\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 e-olymp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u043e\u0447\u043a\u0430 \u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u041f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043b\u0438 \u0442\u043e\u0447\u043a\u0430 [latex]O[\/latex] \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0443 [latex]ABC[\/latex]? \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u0435\u043a [latex]O, A, B, C[\/latex]. \u0427\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 100. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0432\u0435\u0441\u0442\u0438 1, \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043a\u0430 [latex]O[\/latex] \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0443 [latex]ABC[\/latex] \u0438 0 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u2116 \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 1 2 6 -9 3 8 1 5 11 1 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4562\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":134,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[216,41,196,134,92,86],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4562"}],"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\/134"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4562"}],"version-history":[{"count":1,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4562\/revisions"}],"predecessor-version":[{"id":4683,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4562\/revisions\/4683"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}