{"id":3567,"date":"2018-09-16T17:51:34","date_gmt":"2018-09-16T14:51:34","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3567"},"modified":"2018-11-19T21:18:02","modified_gmt":"2018-11-19T18:18:02","slug":"e-olymp-926-%d1%84%d0%be%d1%80%d0%bc%d1%83%d0%bb%d0%b0-%d0%b3%d0%b5%d1%80%d0%be%d0%bd%d0%b0","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3567","title":{"rendered":"e-olymp 926. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0413\u0435\u0440\u043e\u043d\u0430"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0417\u0430\u0434\u0430\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b\u00a0[latex]a[\/latex],\u00a0[latex]b[\/latex],\u00a0[latex]c[\/latex],\u00a0[latex]d[\/latex]\u00a0\u0438 \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u00a0[latex]f[\/latex]\u00a0\u0432\u044b\u043f\u0443\u043a\u043b\u043e\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0413\u0435\u0440\u043e\u043d\u0430.<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u0434\u0430\u043d\u043e\u00a0[latex]5[\/latex]\u00a0\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b\u00a0[latex] a,\u00a0b,\u00a0\u0441,\u00a0d,\u00a0f [\/latex] [latex]( 0\u00a0&lt;\u00a0a,\u00a0b,\u00a0c,\u00a0d,\u00a0f\u00a0\\leqslant\u00a0100 )[\/latex], \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435.<br \/>\n<a href=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/1.svg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/1.svg\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-medium wp-image-3577\" \/><\/a><\/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 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e\u00a0[latex]4[\/latex]\u00a0\u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438.<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table>\n<tbody>\n<tr>\n<th>#<\/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<td>1<\/td>\n<td>2 2 2 2 2<\/td>\n<td>3.4641<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>7 7 5 6 2<\/td>\n<td>11.6120<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>9 5 3 2 4<\/td>\n<td>2.9047<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>5 7 2 3 4<\/td>\n<td>12.7027<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>7 8 6 2 5<\/td>\n<td>22.0043<\/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 \">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\tdouble a,b,c,d,f,p1,p2,S1,S2,S;\r\n    \t \tScanner in = new Scanner(System.in);\r\n\t\ta = in.nextDouble();\r\n\t\tb = in.nextDouble();\r\n\t\tc = in.nextDouble();\r\n\t\td = in.nextDouble();\r\n\t\tf = in.nextDouble();\r\n\t\tp1=(a+b+f)\/2;\r\n\t\tp2=(c+d+f)\/2;\r\n\t\tS = Math.sqrt(p1*(p1-a)*(p1-b)*(p1-f)) +  Math.sqrt(p2*(p2-c)*(p2-d)*(p2-f));\r\n\t\tSystem.out.printf(\"%.4f\",S);\r\n\t \r\n\t}\r\n}<\/pre>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/p>\n<h1>\n<ul>\n<li>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439 \u0413\u0435\u0440\u043e\u043d\u0430 [latex] S = \\sqrt{p \\cdot(p-a) \\cdot(p-b) \\cdot(p-c)}[\/latex] \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432<\/li>\n<li>\u0421\u043b\u043e\u0436\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/li>\n<\/ul>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u043d\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0423\u043a\u0430\u0436\u0435\u043c \u044d\u0442\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 :  <\/p>\n<pre class=\"lang:java decode:true \">System.out.printf(\"%.4f\",S);<\/pre>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/926\">e-olymp<\/a><\/p>\n<p>\u041a\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 <a href=\"https:\/\/ideone.com\/mlwvcL\">ideone<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0417\u0430\u0434\u0430\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b\u00a0[latex]a[\/latex],\u00a0[latex]b[\/latex],\u00a0[latex]c[\/latex],\u00a0[latex]d[\/latex]\u00a0\u0438 \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u044c\u00a0[latex]f[\/latex]\u00a0\u0432\u044b\u043f\u0443\u043a\u043b\u043e\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0413\u0435\u0440\u043e\u043d\u0430. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u0434\u0430\u043d\u043e\u00a0[latex]5[\/latex]\u00a0\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b\u00a0[latex] a,\u00a0b,\u00a0\u0441,\u00a0d,\u00a0f [\/latex] [latex]( 0\u00a0&lt;\u00a0a,\u00a0b,\u00a0c,\u00a0d,\u00a0f\u00a0\\leqslant\u00a0100 )[\/latex], \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e\u00a0[latex]4[\/latex]\u00a0\u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438. \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 1 2 2 2 2 2 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3567\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":111,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[359,360,333,361,89],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3567"}],"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\/111"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3567"}],"version-history":[{"count":14,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3567\/revisions"}],"predecessor-version":[{"id":3582,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3567\/revisions\/3582"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}