{"id":922,"date":"2016-07-06T11:10:37","date_gmt":"2016-07-06T08:10:37","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=922"},"modified":"2016-07-06T22:09:50","modified_gmt":"2016-07-06T19:09:50","slug":"u4-15","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=922","title":{"rendered":"\u042e4.15"},"content":{"rendered":"<p>\u0417\u0430\u0434\u0430\u043d\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u044b <img decoding=\"async\" class=\"latex\" title=\"A(n)\" src=\"http:\/\/s0.wp.com\/latex.php?latex=A%28n%29&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"A(n)\" \/> \u0438 <img decoding=\"async\" class=\"latex\" title=\"B(m)\" src=\"http:\/\/s0.wp.com\/latex.php?latex=B%28m%29&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"B(m)\" \/>. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u00a0<img decoding=\"async\" class=\"latex\" title=\"C(m+n)\" src=\"http:\/\/s0.wp.com\/latex.php?latex=C%28m%2Bn%29&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"C(m+n)\" \/>, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u00a0<img decoding=\"async\" class=\"latex\" title=\"A\" src=\"http:\/\/s0.wp.com\/latex.php?latex=A&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"A\" \/>, \u0430 \u0437\u0430\u0442\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u00a0<img decoding=\"async\" class=\"latex\" title=\"B\" src=\"http:\/\/s0.wp.com\/latex.php?latex=B&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"B\" \/>.<\/p>\n<p>\u0422\u0435\u0441\u0442\u044b:<\/p>\n<table width=\"606\">\n<tbody>\n<tr>\n<td>n<\/td>\n<td>m<\/td>\n<td>A[n]<\/td>\n<td>B[m]<\/td>\n<td>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>4<\/td>\n<td>0 1 2<\/td>\n<td>5 7 8 4<\/td>\n<td>A={0 1 2}<br \/>\nB={5 7 8 4}<br \/>\nC={0 1 2 5 7 8 4}<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>9<\/td>\n<td>9 3.6<\/td>\n<td>7.4 3.6 4.6666 7.99702 1 1 1 1 1<\/td>\n<td>A={9 3.6}<br \/>\nB={7.4 3.6 4.6666 7.99702 1 1 1 1 1}<br \/>\nC={9 3.6 7.4 3.6 4.6666 7.99702 1 1 1 1 1}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u041a\u043e\u0434<\/strong><\/p>\n<pre class=\"lang:java decode:true\">import java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\n \r\nclass U415 {\r\n    public static void main(String[] args) {\r\n        Scanner scanner = new Scanner(System.in);\r\n        int n, m;\r\n        n = scanner.nextInt();\r\n        m = scanner.nextInt();\r\n        double[] A = new double[n];\r\n        double[] B = new double[m];\r\n        double[] C = new double[n + m];\r\n        for (int i = 0; i &lt; n; i++) {\r\n            A[i] = scanner.nextDouble();\r\n        }\r\n        for (int i = 0; i &lt; m; i++) {\r\n            B[i] = scanner.nextDouble();\r\n        }\r\n        for (int i = 0; i &lt; n + m; i++) {\r\n            if (i &lt; n) {\r\n                C [i] = A[i];\r\n            } else {\r\n                C [i] = B[i - n];\r\n            }\r\n        }\r\n        System.out.println(Arrays.toString(C));\r\n    }\r\n}<\/pre>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong><br \/>\n\u0417\u0430\u0434\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432. \u0412\u0432\u043e\u0434\u0438\u043c \u0438\u0445. \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 <img decoding=\"async\" class=\"latex\" title=\"C\" src=\"http:\/\/s0.wp.com\/latex.php?latex=C&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"C\" \/> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <img decoding=\"async\" class=\"latex\" title=\"A\" src=\"http:\/\/s0.wp.com\/latex.php?latex=A&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"A\" \/> (<img decoding=\"async\" class=\"latex\" title=\"n\" src=\"http:\/\/s0.wp.com\/latex.php?latex=n&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"A\" \/> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432), \u0430 \u0437\u0430\u0442\u0435\u043c (\u0441 <img decoding=\"async\" class=\"latex\" title=\"n\" src=\"http:\/\/s0.wp.com\/latex.php?latex=n&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"A\" \/>-\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 ) &#8212; \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <img decoding=\"async\" class=\"latex\" title=\"n\" src=\"http:\/\/s0.wp.com\/latex.php?latex=B&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"A\" \/>. \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432 <img decoding=\"async\" class=\"latex\" title=\"C\" src=\"http:\/\/s0.wp.com\/latex.php?latex=C&amp;bg=292625&amp;fg=b29d85&amp;s=0\" alt=\"C\" \/>.<\/p>\n<p><a href=\"http:\/\/ideone.com\/qCCkxP\"> \u041a\u043e\u0434 \u043d\u0430 ideone.com <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u043d\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 . \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u00a0, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u00a0, \u0430 \u0437\u0430\u0442\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u00a0. \u0422\u0435\u0441\u0442\u044b: n m A[n] B[m] \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: 3 4 0 1 2 5 7 8 4 A={0 1 2} B={5 7 8 4} C={0 1 2 5 7 8 4} 2 9 9 3.6 7.4 3.6 4.6666 7.99702 1 1 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=922\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":84,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[134,135,75],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/922"}],"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\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=922"}],"version-history":[{"count":5,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/922\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}