{"id":335,"date":"2013-02-14T12:23:00","date_gmt":"2013-02-14T04:23:00","guid":{"rendered":"http:\/\/nike0good.jp1.rpvhost.net\/239"},"modified":"2013-02-14T12:23:00","modified_gmt":"2013-02-14T04:23:00","slug":"uva_10209_is_this_integration_-_inclusion_and_exclusion","status":"publish","type":"post","link":"https:\/\/nike0good.com\/?p=335","title":{"rendered":"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406)"},"content":{"rendered":"<p><center><span style=\"font-family:Times New Roman; font-size:24px\"><strong>Problem C<\/strong><\/span><br \/>\n<span style=\"font-family:Times New Roman; font-size:32px\"><strong>Is This Integration ?<\/strong><\/span><br \/>\n<span style=\"font-family:Times New Roman; font-size:14px\"><strong>Input:&nbsp;<\/strong>Standard Input<\/span><br \/>\n<span style=\"font-family:Times New Roman; font-size:14px\"><strong>Output:&nbsp;<\/strong>Standard Output<\/span><br \/>\n<span style=\"font-family:Times New Roman; font-size:14px\"><strong>Time Limit:&nbsp;<\/strong>3 seconds<\/span><br \/>\n<\/center><\/p>\n<div>\n<p align=\"center\">&nbsp;<\/p>\n<p>In the image below you can see a square ABCD, where&nbsp;<strong>AB = BC = CD = DA = a<\/strong>. Four arcs are drawn taking the four vertexes&nbsp;<strong>A, B, C, D<\/strong>as centers and&nbsp;<strong>a<\/strong>&nbsp;as the radius. The arc that is drawn taking&nbsp;<strong>A<\/strong>&nbsp;as<br \/>\n center, starts at neighboring vertex&nbsp;<strong>B<\/strong>&nbsp;and ends at neighboring vertex&nbsp;<strong>D<\/strong>. All other arcs are drawn in a similar fashion. Regions of three different shapes are created in this fashion. You will have to determine the total area<br \/>\n if these different shaped regions.&nbsp;&nbsp;<\/p>\n<p><center><img decoding=\"async\" src=\"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png\" alt=\"\" \/><\/center><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"font-family:Times New Roman; font-size:24px\">Input<\/span><\/strong><\/p>\n<p>The input file contains a floating-point number&nbsp;<strong>a (a&gt;=0 a&lt;=10000)<\/strong>&nbsp;in each line which indicates the length of one side of the square. Input is terminated by end of file. &nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"font-family:Times New Roman; font-size:24px\">Output<\/span><\/strong><\/p>\n<p>For each line of input, output in a single line the total area of the three types of region (filled with different patterns in the image above). These three numbers will of course be floating point numbers with three digits after the decimal point. First<br \/>\n number will denote the area of the striped region, the second number will denote the total area of the dotted regions and the third number will denote the area of the rest of the regions.<\/p>\n<p><strong>&nbsp;<\/strong><\/p>\n<p><strong><span style=\"font-family:Times New Roman; font-size:24px\">Sample Input:<\/span><\/strong><\/p>\n<p><span style=\"font-family:Courier; font-size:14px\">0.1<br \/>\n0.2<br \/>\n0.3<br \/>\n<\/span><\/p>\n<p><strong><span style=\"font-family:Times New Roman; font-size:24px\">Sample Output:<\/span><\/strong><\/p>\n<p><span style=\"font-family:Courier; font-size:14px\">0.003 0.005 0.002<br \/>\n0.013 0.020 0.007<br \/>\n0.028 0.046 0.016<br \/>\n<\/span><\/p>\n<div align=\"center\"><span style=\"color:windowtext\"><\/span><\/p>\n<hr size=\"2\" width=\"100%\" align=\"center\" \/>\n<\/div>\n<p><strong>Shahriar Manzoor<\/strong><\/p>\n<p><span style=\"font-size:14px\">\u8bbe\u4e2d\u95f4\u90a3\u5757\u9762\u79ef\u4e3ax\uff0c\u56db\u4e2a\u89d2\u7684\u9762\u79ef\u4e3ay\uff0c\u56db\u4e2a\u51f9\u5f62\u7684\u9762\u79ef\u4e3az<\/span><\/p>\n<p><span style=\"font-size:14px\"><img decoding=\"async\" src=\"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838694_8434.png\" alt=\"\" \/><br \/>\n<\/span><\/p>\n<p><span style=\"font-size:14px\">\u5219\u6709<\/span><\/p>\n<p><span style=\"font-size:14px\">x&#43;4y&#43;4z=a^2<\/span><\/p>\n<p><span style=\"font-size:14px\">x&#43;3y&#43;2z=pi\/4*a^2<\/span><\/p>\n<p><span style=\"font-size:14px\">x&#43;2y&#43;z=(pi\/3-\u221a3\/4)a^2 (2\u4e2a\u6247\u5f62-\u4e2d\u95f4\u91cd\u53e0\u7684\u4e09\u89d2\u5f62)<\/span><\/p>\n<p><span style=\"font-size:14px\">\u89e3\u51fa\uff1a<\/span><\/p>\n<p><span style=\"font-size:14px\">x=(1&#43;pi\/3-\u221a3)*a^2<\/span><\/p>\n<p><span style=\"font-size:14px\">y=(pi\/12&#43;\u221a3\/2-1)*a^2<\/span><\/p>\n<p><span style=\"font-size:14px\">z=(-pi\/6&#43;1-\u221a3\/4)*a^2<\/span><\/p>\n<p><span style=\"font-size:14px\">\u53e6\uff1a\u6ce8\u610fpi\u7684\u7cbe\u5ea6<\/span><\/p>\n<p><span style=\"font-size:14px\"><\/span><\/p>\n<pre name=\"code\" class=\"cpp\">#include&lt;cstdio&gt;\n#include&lt;cstdlib&gt;\n#include&lt;algorithm&gt;\n#include&lt;functional&gt;\n#include&lt;iostream&gt;\n#include&lt;cmath&gt;\nusing namespace std;\n#define MAXa (10000)\ndouble a;\nconst double pi=3.141592653589793;\nint main()\n{\n\twhile (scanf(&quot;%lf&quot;,&amp;a)!=EOF)\n\t{\n\t\tprintf(&quot;%.3lf %.3lf %.3lfn&quot;,a*a*(1+pi\/3-sqrt(3.0)),a*a*(pi\/3+2*sqrt(3.0)-4),a*a*(-2*pi\/3+4-sqrt(3.0)));\n\t}\n\treturn 0;\n}<\/pre>\n<\/p>\n<p><span style=\"font-size:14px\"><br \/>\n<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Problem C Is This Integration ? Input:&nbsp;Standard In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[3],"tags":[72],"class_list":["post-335","post","type-post","status-publish","format-standard","hentry","category-defaultcategory","tag-inclusion_and_exclusion"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406) - nike0good<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nike0good.com\/?p=335\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406) - nike0good\" \/>\n<meta property=\"og:description\" content=\"Problem C Is This Integration ? Input:&nbsp;Standard In [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nike0good.com\/?p=335\" \/>\n<meta property=\"og:site_name\" content=\"nike0good\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-14T04:23:00+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png\" \/>\n<meta name=\"author\" content=\"nike0good\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"nike0good\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335\"},\"author\":{\"name\":\"nike0good\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\"},\"headline\":\"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406)\",\"datePublished\":\"2013-02-14T04:23:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335\"},\"wordCount\":278,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360838673_2398.png\",\"keywords\":[\"\u5bb9\u65a5\u539f\u7406\"],\"articleSection\":[\"DefaultCategory\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nike0good.com\\\/?p=335#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335\",\"url\":\"https:\\\/\\\/nike0good.com\\\/?p=335\",\"name\":\"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406) - nike0good\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360838673_2398.png\",\"datePublished\":\"2013-02-14T04:23:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nike0good.com\\\/?p=335\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#primaryimage\",\"url\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360838673_2398.png\",\"contentUrl\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360838673_2398.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=335#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nike0good.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#website\",\"url\":\"https:\\\/\\\/nike0good.com\\\/\",\"name\":\"nike0good\",\"description\":\"\u6709\u6240\u4f5c\u4e3a\u662f\u4eba\u751f\u7684\u6700\u9ad8\u5883\u754c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nike0good.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\",\"name\":\"nike0good\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"caption\":\"nike0good\"},\"sameAs\":[\"https:\\\/\\\/nike0good.com\"],\"url\":\"https:\\\/\\\/nike0good.com\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406) - nike0good","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nike0good.com\/?p=335","og_locale":"zh_CN","og_type":"article","og_title":"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406) - nike0good","og_description":"Problem C Is This Integration ? Input:&nbsp;Standard In [&hellip;]","og_url":"https:\/\/nike0good.com\/?p=335","og_site_name":"nike0good","article_published_time":"2013-02-14T04:23:00+00:00","og_image":[{"url":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png","type":"","width":"","height":""}],"author":"nike0good","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"nike0good","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nike0good.com\/?p=335#article","isPartOf":{"@id":"https:\/\/nike0good.com\/?p=335"},"author":{"name":"nike0good","@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad"},"headline":"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406)","datePublished":"2013-02-14T04:23:00+00:00","mainEntityOfPage":{"@id":"https:\/\/nike0good.com\/?p=335"},"wordCount":278,"commentCount":0,"image":{"@id":"https:\/\/nike0good.com\/?p=335#primaryimage"},"thumbnailUrl":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png","keywords":["\u5bb9\u65a5\u539f\u7406"],"articleSection":["DefaultCategory"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nike0good.com\/?p=335#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nike0good.com\/?p=335","url":"https:\/\/nike0good.com\/?p=335","name":"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406) - nike0good","isPartOf":{"@id":"https:\/\/nike0good.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nike0good.com\/?p=335#primaryimage"},"image":{"@id":"https:\/\/nike0good.com\/?p=335#primaryimage"},"thumbnailUrl":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png","datePublished":"2013-02-14T04:23:00+00:00","author":{"@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad"},"breadcrumb":{"@id":"https:\/\/nike0good.com\/?p=335#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nike0good.com\/?p=335"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/nike0good.com\/?p=335#primaryimage","url":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png","contentUrl":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360838673_2398.png"},{"@type":"BreadcrumbList","@id":"https:\/\/nike0good.com\/?p=335#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nike0good.com\/"},{"@type":"ListItem","position":2,"name":"UVA 10209(Is This Integration ?-\u5bb9\u65a5\u539f\u7406)"}]},{"@type":"WebSite","@id":"https:\/\/nike0good.com\/#website","url":"https:\/\/nike0good.com\/","name":"nike0good","description":"\u6709\u6240\u4f5c\u4e3a\u662f\u4eba\u751f\u7684\u6700\u9ad8\u5883\u754c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nike0good.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad","name":"nike0good","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","caption":"nike0good"},"sameAs":["https:\/\/nike0good.com"],"url":"https:\/\/nike0good.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts\/335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=335"}],"version-history":[{"count":0,"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions"}],"wp:attachment":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}