{"id":3122,"date":"2017-08-24T00:40:02","date_gmt":"2017-08-23T21:40:02","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3122"},"modified":"2017-11-28T02:16:48","modified_gmt":"2017-11-27T23:16:48","slug":"%d0%ba%d0%bb%d0%b0%d1%81%d1%81-%d0%b4%d0%bb%d1%8f-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d1%8b-%d1%81-%d0%b3%d0%b5%d0%be%d0%bc%d0%b5%d1%82%d1%80%d0%b8%d1%87%d0%b5%d1%81%d0%ba%d0%b8%d0%bc%d0%b8-%d0%b2%d0%b5","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3122","title":{"rendered":"\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>9. \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0439\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table style=\"height: 60px\" width=\"711\">\n<tbody>\n<tr>\n<td style=\"width: 64px;text-align: center\">$latex x_1$<\/td>\n<td style=\"width: 64px;text-align: center\">$latex y_1$<\/td>\n<td style=\"width: 64px;text-align: center\">$latex x_2$<\/td>\n<td style=\"width: 65px;text-align: center\">$latex y_2$<\/td>\n<td style=\"width: 65px;text-align: center\">$latex x_3$<\/td>\n<td style=\"width: 65px;text-align: center\">$latex y_3$<\/td>\n<td style=\"width: 65px;text-align: center\">$latex x_4$<\/td>\n<td style=\"width: 65px;text-align: center\">$latex y_4$<\/td>\n<td style=\"width: 65px;text-align: center\">\u0421\u043a. \u043f\u0440.<\/td>\n<td style=\"width: 65px;text-align: center\">\u0423\u0433\u043e\u043b<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 64px;text-align: center\">4<\/td>\n<td style=\"width: 64px;text-align: center\">4<\/td>\n<td style=\"width: 64px;text-align: center\">61<\/td>\n<td style=\"width: 65px;text-align: center\">12<\/td>\n<td style=\"width: 65px;text-align: center\">44<\/td>\n<td style=\"width: 65px;text-align: center\">65<\/td>\n<td style=\"width: 65px;text-align: center\">21<\/td>\n<td style=\"width: 65px;text-align: center\">51<\/td>\n<td style=\"width: 65px;text-align: center\">-1423<\/td>\n<td style=\"width: 65px;text-align: center\">2.7342438697918836<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u041a\u043e\u0434<\/h1>\n<p>&nbsp;<\/p>\n<pre class=\"lang:java decode:true \">import java.util.*;\r\nimport java.lang.Math.*;\r\nimport java.io.*;\r\n \r\nclass geomVector\r\n{\r\n\tpublic double x1,x2,y1,y2,xV,yV,xM,yM,vL;\r\n\tpublic void setVector(double a1,double b1, double a2, double b2)\r\n\t{\r\n\t\tx1 = a1;\r\n\t\tx2 = a2;\r\n\t\ty1 = b1;\r\n\t\ty2 = b2;\r\n\t}\r\n\tpublic void getVectorCoords()\r\n\t{\r\n\t\txV = x2 - x1;\r\n\t\tyV = y2 - y1;\r\n\t}\r\n\tpublic void getMiddleCoords()\r\n\t{\r\n\t\tgetVectorCoords();\r\n\t\txM = xV\/2;\r\n\t\tyM = yV\/2;\r\n\t}\r\n\tpublic void multiplyVector(double a)\r\n\t{\r\n\t\tx1*=a;\r\n\t\tx2*=a;\r\n\t\ty1*=a;\r\n\t\ty2*=a;\r\n\t\tgetVectorCoords();\r\n\t\tgetMiddleCoords();\r\n\t}\r\n\tpublic double getLength()\r\n\t{\r\n\t\treturn vL = Math.sqrt(xV*xV+yV*yV);\r\n\t}\r\n\tpublic void vectorSum(geomVector a,geomVector b)\r\n\t{\r\n\t\ta.setVector(a.x1,a.y1,b.x2,b.y2);\r\n\t}\r\n\tpublic double scalMult(geomVector a,geomVector b)\r\n\t{\r\n\t\treturn (a.xV*b.xV+a.yV*b.yV);\r\n\t}\r\n\tpublic double getAngle(geomVector a, geomVector b)\r\n\t{\r\n\t\treturn Math.acos(scalMult(a,b)\/(a.getLength()*b.getLength()));\r\n\t}\r\n}\r\n \r\npublic class Main {\r\n\tpublic static void main(String[] args)\r\n\t{\r\n\t\tdouble x1,x2,x3,x4,y1,y2,y3,y4;\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tx1 = in.nextDouble();\r\n\t\tx2 = in.nextDouble();\r\n\t\tx3 = in.nextDouble();\r\n\t\tx4 = in.nextDouble();\r\n\t\ty1 = in.nextDouble();\r\n\t\ty2 = in.nextDouble();\r\n\t\ty3 = in.nextDouble();\r\n\t\ty4 = in.nextDouble();\r\n\t\tgeomVector a = new geomVector();\r\n\t\tgeomVector b = new geomVector();\r\n\t\ta.setVector(x1,y1,x2,y2);\r\n\t\tb.setVector(x3,y3,x4,y4);\r\n\t\ta.getVectorCoords();\r\n\t\tb.getVectorCoords();\r\n\t\tSystem.out.println(b.scalMult(b,a));\r\n\t\tSystem.out.println(a.getAngle(a,b));\r\n\t}\r\n}<\/pre>\n<h1>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h1>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 $latex x_1,y_1,x_2,y_2$ \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043a\u043e\u043d\u0446\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, $latex x_V$ \u0438 $latex y_V$ &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430, $latex x_M$ \u0438 $latex y_M$ &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430, $latex v_L$ &#8212; \u0434\u043b\u0438\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0434\u043b\u0438\u043d\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430 \u0447\u0438\u0441\u043b\u043e, \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u0430 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438.<\/p>\n<p>\u041a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/ideone.com\/P6C9m6\">ideone<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 9. \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0439\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0422\u0435\u0441\u0442\u044b $latex x_1$ $latex y_1$ $latex x_2$ $latex y_2$ $latex x_3$ $latex y_3$ $latex x_4$ $latex y_4$ \u0421\u043a. \u043f\u0440. \u0423\u0433\u043e\u043b 4 4 61 12 44 65 21 51 -1423 2.7342438697918836 \u041a\u043e\u0434 &nbsp; import java.util.*; import java.lang.Math.*; import java.io.*; class &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3122\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":104,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[41,165,163,166],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3122"}],"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\/104"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3122"}],"version-history":[{"count":7,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3122\/revisions"}],"predecessor-version":[{"id":3224,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3122\/revisions\/3224"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}