{"id":4515,"date":"2018-12-26T19:45:33","date_gmt":"2018-12-26T16:45:33","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4515"},"modified":"2018-12-27T18:11:49","modified_gmt":"2018-12-27T15:11:49","slug":"e-olymp-2471-%d0%be%d1%82-%d0%bc%d0%b0%d1%82%d1%80%d0%b8%d1%86%d1%8b-%d1%81%d0%bc%d0%b5%d0%b6%d0%bd%d0%be%d1%81%d1%82%d0%b8-%d0%ba-%d1%81%d0%bf%d0%b8%d1%81%d0%ba%d1%83-%d1%80%d1%91%d0%b1%d0%b5%d1%80","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=4515","title":{"rendered":"e-olymp 2471. \u041e\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0440\u0451\u0431\u0435\u0440"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0435\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u0437\u0430\u0434\u0430\u043d \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u044b\u0432\u0435\u0434\u0438\u0442\u0435 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440e\u0431\u0435\u0440.<\/p>\n<h2>\u0412\u0432\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 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d $n$ $(1 \\leq n \\leq 100)$ \u0432 \u0433\u0440\u0430\u0444\u0435. \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0443\u0442 $n$ \u0441\u0442\u0440\u043e\u043a \u043f\u043e $n$ \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 &#8212; \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0431\u0435\u0440, \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u0432 \u043f\u0430\u0440\u0435 \u0432\u0435\u0440\u0448\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0431\u0440\u043e.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<table>\n<tr>\n<td>\n\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\n<\/td>\n<td>\n\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435\n<\/td>\n<\/tr>\n<tr>\n<td>\n$3$<br \/>\n$0$ $1$ $1$<br \/>\n$1$ $0$ $1$<br \/>\n$1$ $1$ $0$\n<\/td>\n<td>\n$1$ $2$<br \/>\n$1$ $3$<br \/>\n$2$ $3$\n<\/td>\n<\/tr>\n<tr>\n<td>\n$3$<br \/>\n$0$ $1$ $0$<br \/>\n$1$ $0$ $0$<br \/>\n$0$ $0$ $0$\n<\/td>\n<td>\n$1$ $2$\n<\/td>\n<\/tr>\n<tr>\n<td>\n$5$<br \/>\n$0$ $1$ $0$ $1$ $1$<br \/>\n$1$ $0$ $0$ $0$ $0$<br \/>\n$0$ $0$ $0$ $0$ $0$<br \/>\n$1$ $0$ $0$ $0$ $0$<br \/>\n$1$ $0$ $0$ $0$ $0$\n<\/td>\n<td>\n$1$ $2$<br \/>\n$1$ $4$<br \/>\n$1$ $5$\n<\/td>\n<\/tr>\n<\/table>\n<h2>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\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\tScanner in = new Scanner(System.in);\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\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i &lt; n; i++) {\r\n\t\t\tfor(int j = i; j &lt; n; j++) {\r\n\t\t\t\tif(x[i][j] == 1) System.out.println((i+1) + \" \" + (j+1));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438. \u0414\u0430\u043b\u0435\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u044b\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b (\u0438\u0437 \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438 \u0432 \u043a\u0430\u043a\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443 \u0438\u0434\u0435\u0442 \u0440\u0435\u0431\u0440\u043e, \u0442.\u0435. \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0431\u0435\u0440). \u0417\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/2471\">e-olymp<\/a><br \/>\n\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/ideone.com\/Y7kX2g\">ideone.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0435\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u0437\u0430\u0434\u0430\u043d \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u044b\u0432\u0435\u0434\u0438\u0442\u0435 \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440e\u0431\u0435\u0440. \u0412\u0432\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 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d $n$ $(1 \\leq n \\leq 100)$ \u0432 \u0433\u0440\u0430\u0444\u0435. \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0443\u0442 $n$ \u0441\u0442\u0440\u043e\u043a \u043f\u043e $n$ \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 &#8212; \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0431\u0435\u0440, \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u0432 \u043f\u0430\u0440\u0435 \u0432\u0435\u0440\u0448\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u0430\u044f &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4515\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":132,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[109],"tags":[618,619,620],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4515"}],"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\/132"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4515"}],"version-history":[{"count":3,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4515\/revisions"}],"predecessor-version":[{"id":4519,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4515\/revisions\/4519"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}