{"id":172439,"date":"2020-10-25T23:35:34","date_gmt":"2020-10-25T15:35:34","guid":{"rendered":"http:\/\/4563.org\/?p=172439"},"modified":"2020-10-25T23:35:34","modified_gmt":"2020-10-25T15:35:34","slug":"%e4%b8%80%e9%81%93-oj-%e7%9a%84%e9%a2%98%e6%b1%82%e5%a4%a7%e4%bd%ac%e5%b8%ae%e5%8a%a9","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=172439","title":{"rendered":"\u4e00\u9053 oj \u7684\u9898\u6c42\u5927\u4f6c\u5e2e\u52a9"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e00\u9053 oj \u7684\u9898\u6c42\u5927\u4f6c\u5e2e\u52a9               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : KIRAYOMATO <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/10\/20201026_5f96c07b9a6fc.png\" alt=\"\u4e00\u9053 oj \u7684\u9898\u6c42\u5927\u4f6c\u5e2e\u52a9\" \/> \u9898\u76ee\u5982\u56fe\uff0c\u6211\u5199\u7684\u4ee3\u7801\u672c\u5730\u8fd0\u884c\u6837\u4f8b\u548c\u81ea\u5df1\u7f16\u7684\u51e0\u7ec4\u6570\u636e\u6211\u90fd\u6ca1\u53d1\u73b0\u9519\uff0c\u4f46\u5c31\u662f\u4e00\u76f4 wa<\/p>\n<pre><code>#include&lt;iostream&gt;  using namespace std;  long long a[3]; int i,n,x=0,t=0;  int main() {     ios::sync_with_stdio(false);     for (i = 0;i &lt; 3;++i)     {         cin &gt;&gt; a[i];     }     for (i = 0;i &lt; a[0];++i)     {         cin &gt;&gt; n;         n += x;             if (n &gt; a[1])             {                 t += n - a[1];                 x += a[2];             }     }     cout &lt;&lt; t;     return 0; } <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3803083\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : youngzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8003\u8651\u6781\u7aef\u60c5\u51b5\uff0c\u5728 n=2e5 w=0 k=1e4 \u7136\u540e n \u4e2a 1e4<br \/>\u8fd9\u6837\u6700\u540e\u7684\u7ed3\u679c\u611f\u89c9\u53ef\u80fd\u4f1a\u6ea2\u51fa int                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3803084\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : KIRAYOMATO <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youngzy \u8fd8\u771f\u662f<br \/>\u6539\u6210 long long \u5c31\u8fc7\u4e86<br \/>\u6c14\u5230\u5410\u8840                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3803085\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : WhoMercy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65e2\u7136\u95ee\u9898\u89e3\u51b3\u4e86\uff0c\u6211\u5c31\u5410\u69fd\u4e0b\uff0c\u903b\u8f91\u4e0d\u7b97\u590d\u6742\u7684\u9898\u76ee\u975e\u5f97\u5957\u4e0a\u8fd9\u4e48\u4e2a\u6545\u4e8b\uff0c\u7406\u89e3\u9898\u76ee\u5c31\u5f88\u7d2f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3803086\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : irytu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @WhoMercy \u5c31\u8ddf\u5c0f\u5b66\u6570\u5b66\u9898\u5199\u4e00\u5927\u6bb5\uff0c\u672c\u8d28\u4e0a\u53d8\u6210\u4e86\u8bed\u6587\u95ee\u9898                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3803087\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Cbdy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9898\u76ee\u90fd\u5feb\u770b\u4e0d\u61c2\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3803088\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : youngzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @WhoMercy \u8fd9\u79cd\u9898\u4e00\u822c\u90fd\u662f\u7b97\u6cd5\u6bd4\u8d5b\u7528\u7684\uff0c\u7136\u540e\u4e3a\u4e86\u4e0d\u548c\u4ee5\u524d\u7684\u9898\u76ee\u91cd\u590d\uff0c\u5c31\u53ea\u80fd\u8fd9\u4e48\u5361\u9605\u8bfb\u65f6\u95f4\u4e86\u3002\u5426\u5219\u53ef\u80fd\u5c31\u4f1a\u53d8\u6210\u76f4\u63a5\u544a\u8bc9\u4f60\u8be5\u7528\u4ec0\u4e48\u6570\u636e\u7ed3\u6784\u548c\u7b97\u6cd5\u89e3\u9898\u4e86\u3002\uff08\u5176\u5b9e\u8fd8\u6709\u9898\u76ee\u548c\u7a0b\u5e8f\u6ca1\u6709\u4e00\u5206\u94b1\u5173\u7cfb\u7684\u90a3\u79cd\uff0c\u4e13\u95e8\u5751\u4eba\uff09                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3803089\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : WhoMercy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @youngzy #6 \u6bd4\u8d5b\u6bd4\u7684\u662f\u9605\u8bfb\u7406\u89e3\u561b\uff0c\u6253 Leetcode \u5468\u8d5b\u4e5f\u6ca1\u9047\u5230\u8fd9\u4e48\u7ed5\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u9053 oj \u7684\u9898\u6c42\u5927\u4f6c\u5e2e\u52a9 \u8cc7\u6df1\u5927&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/172439"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=172439"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/172439\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172439"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}