{"id":760,"date":"2016-07-04T20:58:08","date_gmt":"2016-07-04T17:58:08","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=760"},"modified":"2016-07-06T12:17:00","modified_gmt":"2016-07-06T09:17:00","slug":"yu4-8","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=760","title":{"rendered":"\u042e4.8"},"content":{"rendered":"<h3>\u0423\u0441\u043b\u043e\u0432\u0438\u0435<\/h3>\n<p>\u0412 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 C(m) \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0441\u0443\u043c\u043c\u043e\u0439 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445, \u0430 \u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c \u2013 \u043f\u043e\u043b\u0443\u0441\u0443\u043c\u043c\u043e\u0439 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441 \u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0417\u0430\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u0417\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u0438\u0437 \u0442\u0440\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c.<\/p>\n<h3>\u041a\u043e\u0434<\/h3>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/ideone.com\/r9nsNu\">Ideone<\/a>.<\/p>\n<pre class=\"lang:java decode:true \">import java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\n \r\nclass Ideone {\r\n\tpublic static void main ( String[] arg s ) {\r\n\t\tScanner in = new Scanner( System.in );\r\n\t\tint n = in.nextInt();\r\n\t\tint[] array = new int[n];\r\n\t\tif(n &gt;= 3) {\r\n\t\t\tfor( int i = 0; i &lt; n; i++ ) array[i] = in.nextInt();\r\n\t\t\tfor( int i=2; i&lt;n; i=i+3 ) {\r\n\t\t\t\tint elem = array[i-1];\r\n\t\t\t\tarray[i-1] = ( array[i-2] + array[i] ) \/ 2;\r\n\t\t\t\tarray[i] = ( array[i-2] + elem ) \/ 2;\r\n\t\t\t}\r\n\t\t\tString ArrayString = Arrays.toString(array);\r\n\t\t\tSystem.out.print( ArrayString );\r\n\t\t} else System.out.print( \"Try again\" );\r\n\t}\r\n}<\/pre>\n<h3>\u0422\u0435\u0441\u0442<\/h3>\n<table style=\"height: 150px\" width=\"430\">\n<tbody>\n<tr style=\"height: 30px\">\n<td style=\"width: 276px;height: 30px\" colspan=\"2\">\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td style=\"width: 138px;height: 60px\" rowspan=\"2\">\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<\/tr>\n<tr style=\"height: 30px\">\n<td style=\"width: 135px;height: 30px\">\u0420\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/td>\n<td style=\"width: 135px;height: 30px\">\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b<\/td>\n<\/tr>\n<tr style=\"height: 31px\">\n<td style=\"width: 135px;height: 31px\">4<\/td>\n<td style=\"width: 135px;height: 31px\">2 7 4 1<\/td>\n<td style=\"width: 138px;height: 31px\">2.0, 3.0, 4.5, 1.0<\/td>\n<\/tr>\n<tr style=\"height: 31.875px\">\n<td style=\"width: 135px;height: 31.875px\">2<\/td>\n<td style=\"width: 135px;height: 31.875px\">5 8<\/td>\n<td style=\"width: 138px;height: 31.875px\">Try again<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0412 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 C(m) \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0441\u0443\u043c\u043c\u043e\u0439 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445, \u0430 \u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c \u2013 \u043f\u043e\u043b\u0443\u0441\u0443\u043c\u043c\u043e\u0439 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441 \u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0417\u0430\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u0417\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043c\u0435\u043d\u0435\u0435 \u0447\u0435\u043c \u0438\u0437 \u0442\u0440\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c. &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=760\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":80,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[111,75,115],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/760"}],"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\/80"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=760"}],"version-history":[{"count":11,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":995,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/760\/revisions\/995"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}