{"id":3784,"date":"2018-11-13T01:00:20","date_gmt":"2018-11-12T22:00:20","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3784"},"modified":"2018-11-19T21:45:41","modified_gmt":"2018-11-19T18:45:41","slug":"e-olymp-8530-%d0%bf%d0%b5%d1%87%d0%b0%d1%82%d1%8c-%d0%bc%d0%b0%d1%82%d1%80%d0%b8%d1%86%d1%8b","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3784","title":{"rendered":"e-olymp 8530. \u041f\u0435\u0447\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0417\u0430\u0434\u0430\u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 $n \\times n$ &#8212; \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0435 $[1 \\ldots n] \\times [1 \\ldots n]$ \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0414\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 $r$ \u0438 $c$ \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 $[1 \\ldots r] \\times [1 \\ldots c]$ \u043c\u0430\u0441\u0441\u0438\u0432 ($r$ \u0441\u0442\u0440\u043e\u043a \u0438 $c$ \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430).<\/p>\n<h2>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0438\u0441\u043b\u043e $n \\space (1 \\leq n \\leq 100)$. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 $n \\times n$. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430 $r$ \u0438 $c \\space (1 \\leq r, c \\leq n)$. \u0412\u0441\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e $100$.<\/p>\n<h2>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0412\u044b\u0432\u0435\u0434\u0438\u0442\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 $r \\times c$.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<table>\n<tbody>\n<tr>\n<td>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<\/tr>\n<tr>\n<td>\n4<br \/>\n1 2 3 4<br \/>\n5 6 7 8<br \/>\n9 1 2 3<br \/>\n4 5 6 7<br \/>\n3 2\n<\/td>\n<td>\n1 2<br \/>\n5 6<br \/>\n9 1\n<\/td>\n<\/tr>\n<tr>\n<td>\n5<br \/>\n18 25 34 44 -43<br \/>\n54 65 75 85 -32<br \/>\n95 15 25 35 -3<br \/>\n-4 15 -6 37 0<br \/>\n44 43 23 3 -12<br \/>\n4 3\n<\/td>\n<td>\n18 25 34<br \/>\n54 65 75<br \/>\n95 15 25<br \/>\n-4 15 -6\n<\/td>\n<\/tr>\n<tr>\n<td>\n6<br \/>\n30 -10 30 -69 -84 75<br \/>\n-3 -39 60 15 75 -74<br \/>\n36 68 35 23 25 -44<br \/>\n16 42 83 15 59 -18<br \/>\n71 43 35 -81 -38 51<br \/>\n37 -49 55 26 6 33<br \/>\n4 5<\/td>\n<td>\n30 -10 30 -69 -84<br \/>\n-3 -39 60 15 75<br \/>\n36 68 35 23 25<br \/>\n16 42 83 15 59\n<\/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 8530. \u041f\u0435\u0447\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b\">import java.io.*;\r\nimport java.util.*;\r\n \r\npublic class Main\r\n{\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tPrintWriter out = new PrintWriter(System.out);\r\n \r\n\t\tint n = in.nextInt();\r\n\t\tint [][] x = new int [n][n];\r\n\t\tfor (int i = 0; i &lt; n; i++)\r\n\t\t\tfor (int j = 0; j &lt; n; j++)\r\n\t\t\t\tx[i][j] = in.nextInt();\r\n\t\tint r = in.nextInt();\r\n\t\tint c = in.nextInt();\r\n\t\tfor (int i = 0; i &lt; r; i++) {\r\n\t\t\tfor (int j = 0; j &lt; c; j++)\r\n\t\t\t\tout.print(x[i][j] + \" \");\r\n\t\t\tout.print(\"\\n\");\r\n\t\t}\r\n \r\n\t\tout.flush();\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 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c $2$ \u0446\u0438\u043a\u043b\u0430, \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439:<\/p>\n<ul>\n<li>\u043f\u0435\u0440\u0432\u044b\u0439 \u0446\u0438\u043a\u043b ($17$ \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430) \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043c\u0430\u0442\u0440\u0438\u0446\u044b &#8212; \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u044b\u0435 $r$ \u0441\u0442\u0440\u043e\u043a;<\/li>\n<li>\u0432\u0442\u043e\u0440\u043e\u0439 \u0446\u0438\u043a\u043b ($18$ \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430) \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u044b &#8212; \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u044b\u0435 $c$ \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432.<\/li>\n<\/ul>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p><a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/8530\">\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 e-olymp<\/a><br \/>\n<a href=\"https:\/\/ideone.com\/7qHFZn\">\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 Ideone<\/a><br \/>\n<a href=\"http:\/\/cpp.mazurok.com\/e-olymp_8530\/\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 C++<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0417\u0430\u0434\u0430\u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 $n \\times n$ &#8212; \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0435 $[1 \\ldots n] \\times [1 \\ldots n]$ \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u0414\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 $r$ \u0438 $c$ \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 $[1 \\ldots r] \\times [1 \\ldots c]$ \u043c\u0430\u0441\u0441\u0438\u0432 ($r$ \u0441\u0442\u0440\u043e\u043a \u0438 $c$ \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430). \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u0438\u0441\u043b\u043e $n \\space (1 \\leq n \\leq 100)$. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3784\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":114,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,14,26],"tags":[112],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3784"}],"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\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3784"}],"version-history":[{"count":7,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3784\/revisions"}],"predecessor-version":[{"id":3802,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3784\/revisions\/3802"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}