{"id":1498,"date":"2016-10-16T17:23:12","date_gmt":"2016-10-16T14:23:12","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=1498"},"modified":"2016-11-06T17:31:15","modified_gmt":"2016-11-06T14:31:15","slug":"a410e","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=1498","title":{"rendered":"A410e"},"content":{"rendered":"<p>\u0414\u0430\u043d\u0430 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 [latex]\\begin{bmatrix}a_{i,j}\\end{bmatrix},i,j=1,..,n[\/latex].\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c [latex]b_{1},..,b_{n}[\/latex],\u0433\u0434\u0435 [latex]b_{i}[\/latex] \u2014 \u044d\u0442\u043e:<\/p>\n[latex]\\underset{1\\leq j\\leq n}{\\max a_{ij}}\\ * \\underset{1\\leq j\\leq n}{\\min a_{ji}}[\/latex]\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430\u0434\u043e \u0432\u0437\u044f\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 [latex]i[\/latex]-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 [latex]i[\/latex] -\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0434\u0430\u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 2-\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 [latex]\\begin{Vmatrix}1&amp;2\\\\4&amp;1\\end{Vmatrix}[\/latex] \u0442\u043e [latex]b_{1} = 2[\/latex], [latex]b_{2} = 4[\/latex].<\/p>\n<pre class=\"lang:java decode:true\">    import java.util.*;\r\n    import java.lang.*;\r\n    import java.io.*;\r\n     \r\n    \/* Name of the class has to be \"Main\" only if the class is public. *\/\r\nclass Ideone\r\n{\r\n\tpublic static void main (String[] args) throws java.lang.Exception{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint n,maxa,mina;\r\n\t\tn = in.nextInt();\r\n\t\tint a[][] = new int[n][n];\r\n\t\t\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\ta[i][j] = in.nextInt();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tint b[] = new int[n];\r\n\t\t\r\n\t\tfor( int i = 0; i &lt; n; ++i ) {\r\n\t\t\r\n\t\t\tmaxa = a[i][0]; \/\/\u041f\u0440\u0438\u0434\u0430\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 i-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.\r\n\t\t\tmina = a[0][i]; \/\/\u041c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u0434\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 i-\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430.\r\n\t\t\r\n\t\t\tfor( int j = 0; j &lt; n; ++j ) {\r\n\t\t\t\tmaxa = (maxa &gt; a[i][j] ? maxa : a[i][j]); \/\/\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c i-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.\r\n\t\t\t\tmina = (mina &lt; a[j][i] ? mina : a[j][i]); \/\/\u041c\u0438\u043d\u0438\u043c\u0443\u043c i-\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430.\r\n\t\t\t}\r\n\t\t\r\n\t\t\tb[i] = maxa * mina; \/\/\u041d\u0430\u0448 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.\r\n\t\t}\t\r\n\t\t\t\r\n\t\tfor( int i = 0; i &lt; n; ++i ){\r\n\t\t\tSystem.out.print( b[i] + \" \" );\r\n\t\t}\t\r\n\t}\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u0422\u0435\u0441\u0442\u044b<\/h3>\n<table>\n<tbody>\n<tr style=\"height: 6.39999px\">\n<td style=\"width: 40px;height: 6.39999px\">\u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 [latex]n[\/latex], \u0433\u0434\u0435 [latex]n[\/latex]:<\/td>\n<td style=\"width: 30px;height: 6.39999px\">[latex]a[i][j][\/latex]<\/td>\n<td style=\"width: 22.9667px;height: 6.39999px\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"width: 23px;height: 24px\">2<\/td>\n<td style=\"width: 23px;height: 24px\">[latex]\\begin{Vmatrix}1&amp;2\\\\4&amp;1\\end{Vmatrix}[\/latex]<\/td>\n<td style=\"width: 22.9667px;height: 24px\">2 4<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"width: 271px;height: 24px\">3<\/td>\n<td style=\"width: 356px;height: 24px\">[latex]\\begin{Vmatrix}1&amp;2&amp;3\\\\4&amp;1&amp;-6\\\\1&amp;-2&amp;-1\\end{Vmatrix}[\/latex]<\/td>\n<td style=\"width: 22.9667px;height: 24px\">3 -8 -6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430\u00a0 [latex]a_{ij}[\/latex], \u0432\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0439 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1-\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 [latex]i[\/latex]-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0414\u0430\u0431\u044b \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u044f \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u0442\u0440\u043e\u043a\u0438\u00a0\u043c\u044b \u043d\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 [latex]i[\/latex]-\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 1-\u043c, \u043f\u0440\u0438\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u043e [latex]i[\/latex]. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c [latex]a_{ij}[\/latex], \u043e\u0434\u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u043e, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 [latex]i[\/latex]-\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430.<\/p>\n<p><a href=\"http:\/\/ideone.com\/4rkYDo\">http:\/\/ideone.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u0430 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 [latex]\\begin{bmatrix}a_{i,j}\\end{bmatrix},i,j=1,..,n[\/latex].\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c [latex]b_{1},..,b_{n}[\/latex],\u0433\u0434\u0435 [latex]b_{i}[\/latex] \u2014 \u044d\u0442\u043e: [latex]\\underset{1\\leq j\\leq n}{\\max a_{ij}}\\ * \\underset{1\\leq j\\leq n}{\\min a_{ji}}[\/latex] \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u043d\u0430\u0434\u043e \u0432\u0437\u044f\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 [latex]i[\/latex]-\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 [latex]i[\/latex] -\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0434\u0430\u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 2-\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 [latex]\\begin{Vmatrix}1&amp;2\\\\4&amp;1\\end{Vmatrix}[\/latex] \u0442\u043e [latex]b_{1} = 2[\/latex], [latex]b_{2} = &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=1498\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":85,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,14,26],"tags":[111,112,75],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1498"}],"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\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1498"}],"version-history":[{"count":36,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions"}],"predecessor-version":[{"id":1615,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions\/1615"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}