{"id":124,"date":"2011-08-04T23:11:19","date_gmt":"2011-08-04T15:11:19","guid":{"rendered":"http:\/\/wangkaixuan.tech\/?p=124"},"modified":"2020-06-03T23:11:57","modified_gmt":"2020-06-03T15:11:57","slug":"poj-2601-simple-calculations","status":"publish","type":"post","link":"http:\/\/www.wangkaixuan.tech\/?p=124","title":{"rendered":"poj 2601 Simple calculations"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\/*\n\u60ed\u6127\u554a\uff0c\u516c\u5f0f\u63a8\u5bfc\u4e86\u8001\u534a\u5929\n\u6570\u5b66\u4e0d\u597d\u7684\u4f24\u4e0d\u8d77\u554a\u3002\u3002\u3002 \n*\/\n#define LOCAL\n#include&lt;iostream>\n#include&lt;iomanip>\nusing namespace std;\nint main()\n{\n#ifdef LOCAL\n       freopen(\"input.txt\",\"r\",stdin);\n       freopen(\"output.txt\",\"w\",stdout);\n#endif\n    \n    int i,n;double x,y,c,sum;\n    while(cin>>n)\n    {\n           sum=0;\n           cin>>x>>y;\n           for(i=1;i&lt;=n;i++)\n           {cin>>c;sum+=2*(n+1-i)*c;}             \n           sum=(n*x+y-sum)\/(n+1);\n           cout&lt;&lt;setprecision(2)&lt;&lt;setiosflags(ios::fixed)&lt;&lt;sum&lt;&lt;endl;\n    }\n    return 0;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-06-01-acm"],"_links":{"self":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":0,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}