{"id":168,"date":"2026-03-26T22:03:49","date_gmt":"2026-03-26T14:03:49","guid":{"rendered":"https:\/\/www.heroking2000.com\/?p=168"},"modified":"2026-03-26T22:03:49","modified_gmt":"2026-03-26T14:03:49","slug":"%e6%b4%9b%e8%b0%b7at_arc075_b-abc063d-widespread","status":"publish","type":"post","link":"https:\/\/www.heroking2000.com\/?p=168","title":{"rendered":"\u6d1b\u8c37AT_arc075_b [ABC063D] Widespread"},"content":{"rendered":"\n<p>\u5f53\u4f60\u6b63\u5728\u6563\u6b65\u65f6\uff0c\u7a81\u7136\u51fa\u73b0\u4e86&nbsp;<em>N<\/em>&nbsp;\u53ea\u9b54\u7269\u3002\u6bcf\u53ea\u9b54\u7269\u62e5\u6709\u4e00\u4e2a\u79f0\u4e3a\u4f53\u529b\u7684\u6570\u503c\uff0c\u7b2c&nbsp;<em>i<\/em>&nbsp;\u53ea\u9b54\u7269\u51fa\u73b0\u65f6\u7684\u4f53\u529b\u4e3a&nbsp;<em>h<\/em><em>i<\/em>\u200b\u3002\u5f53\u67d0\u53ea\u9b54\u7269\u7684\u4f53\u529b\u964d\u81f3&nbsp;0&nbsp;\u4ee5\u4e0b\u65f6\uff0c\u5b83\u4f1a\u7acb\u523b\u6d88\u5931\u3002<\/p>\n\n\n\n<p>\u5e78\u8fd0\u7684\u662f\uff0c\u4f60\u662f\u4e00\u540d\u719f\u7ec3\u7684\u9b54\u6cd5\u5e08\uff0c\u80fd\u591f\u4f7f\u7528\u7206\u70b8\u653b\u51fb\u9b54\u7269\u3002\u6bcf\u6b21\u7206\u70b8\u65f6\uff0c\u4f60\u53ef\u4ee5\u6309\u4ee5\u4e0b\u65b9\u5f0f\u51cf\u5c11\u9b54\u7269\u7684\u4f53\u529b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9009\u62e9\u4e00\u53ea\u4ecd\u7136\u5b58\u6d3b\u7684\u9b54\u7269\uff0c\u4ee5\u5b83\u4e3a\u4e2d\u5fc3\u5f15\u53d1\u7206\u70b8\u3002\u7206\u70b8\u4e2d\u5fc3\u7684\u9b54\u7269\u4f53\u529b\u51cf\u5c11\u00a0<em>A<\/em>\uff0c\u5176\u4f59\u6240\u6709\u9b54\u7269\u7684\u4f53\u529b\u5404\u81ea\u51cf\u5c11\u00a0<em>B<\/em>\u3002\u5176\u4e2d\u00a0<em>A<\/em>\u00a0\u548c\u00a0<em>B<\/em>\u00a0\u662f\u5df2\u77e5\u7684\u5e38\u6570\uff0c\u4e14\u00a0<em>A<\/em>><em>B<\/em>\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8981\u5f7b\u5e95\u6d88\u706d\u6240\u6709\u9b54\u7269\uff0c\u6700\u5c11\u9700\u8981\u5f15\u53d1\u591a\u5c11\u6b21\u7206\u70b8\uff1f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8f93\u5165\u683c\u5f0f<\/h2>\n\n\n\n<p>\u8f93\u5165\u4ee5\u5982\u4e0b\u683c\u5f0f\u7ed9\u51fa\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>N<\/em>&nbsp;<em>A<\/em>&nbsp;<em>B<\/em>&nbsp;<em>h<\/em>1\u200b&nbsp;<em>h<\/em>2\u200b&nbsp;\u2026&nbsp;<em>h<\/em><em>N<\/em>\u200b<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u8f93\u51fa\u683c\u5f0f<\/h2>\n\n\n\n<p>\u8f93\u51fa\u6d88\u706d\u6240\u6709\u9b54\u7269\u6240\u9700\u7684\u6700\u5c0f\u7206\u70b8\u6b21\u6570\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8f93\u5165\u8f93\u51fa\u6837\u4f8b<\/h2>\n\n\n\n<p><strong>\u8f93\u5165 #1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">4 5 3\n8\n7\n4\n2<\/pre>\n\n\n\n<p><strong>\u8f93\u51fa #1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">2<\/pre>\n\n\n\n<p><strong>\u8f93\u5165 #2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">2 10 4\n20\n20<\/pre>\n\n\n\n<p><strong>\u8f93\u51fa #2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">4<\/pre>\n\n\n\n<p><strong>\u8f93\u5165 #3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">5 2 1\n900000000\n900000000\n1000000000\n1000000000\n1000000000<\/pre>\n\n\n\n<p><strong>\u8f93\u51fa #3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">800000000<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bf4\u660e\/\u63d0\u793a<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u9650\u5236<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8f93\u5165\u4e2d\u7684\u6240\u6709\u6570\u5747\u4e3a\u6574\u6570\u3002<\/li>\n\n\n\n<li>1\u2264<em>N<\/em>\u2264105<\/li>\n\n\n\n<li>1\u2264<em>B<\/em>&lt;<em>A<\/em>\u2264109<\/li>\n\n\n\n<li>1\u2264<em>h<\/em><em>i<\/em>\u200b\u2264109<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6837\u4f8b\u89e3\u91ca 1<\/h3>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\uff0c\u5728&nbsp;2&nbsp;\u6b21\u7206\u70b8\u5185\u6d88\u706d\u5168\u90e8\u9b54\u7269\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9996\u5148\uff0c\u4ee5\u4f53\u529b\u4e3a\u00a08\u00a0\u7684\u9b54\u7269\u4e3a\u4e2d\u5fc3\u5f15\u7206\u3002\u56db\u53ea\u9b54\u7269\u7684\u4f53\u529b\u5206\u522b\u53d8\u4e3a\u00a03\uff0c4\uff0c1\uff0c\u22121\uff0c\u6700\u540e\u4e00\u53ea\u9b54\u7269\u6d88\u5931\u3002<\/li>\n\n\n\n<li>\u63a5\u7740\uff0c\u518d\u4ee5\u5269\u4f59\u4f53\u529b\u4e3a\u00a04\u00a0\u7684\u9b54\u7269\u4e3a\u4e2d\u5fc3\u5f15\u7206\u3002\u5269\u4e0b\u7684\u4e09\u53ea\u9b54\u7269\u4f53\u529b\u5206\u522b\u53d8\u4e3a\u00a00\uff0c\u22121\uff0c\u22122\uff0c\u4e8e\u662f\u5168\u90e8\u6d88\u5931\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6837\u4f8b\u89e3\u91ca 2<\/h3>\n\n\n\n<p>\u5fc5\u987b\u5206\u522b\u4ee5\u6bcf\u53ea\u9b54\u7269\u4e3a\u4e2d\u5fc3\u8fdb\u884c&nbsp;2&nbsp;\u6b21\u7206\u70b8\uff0c\u603b\u5171\u9700\u8981&nbsp;4&nbsp;\u6b21\u7206\u70b8\u3002<\/p>\n\n\n\n<p>\u3010\u4ee3\u7801\u793a\u4f8b\u3011<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;bits\/stdc++.h>\nusing namespace std;\nint n, a, b, h&#91;100005];\n\nbool cmp(int x, int y) {\n\treturn x > y;\n}\n\nint ceil(int x, int y) {\n\tif (x % y == 0)\n\t\treturn x \/ y;\n\telse\n\t\treturn x \/ y + 1;\n}\/\/\u5411\u4e0a\u53d6\u6574\n\nbool check(long long x) {\n\tlong long cnt = 0;\n\tfor (int i = 1; i &lt;= n; i++) {\n\t\tif (h&#91;i] &lt;= x * b)\n\t\t\tcontinue;\n\t\t\/\/\u82e5x\u6b21\u4f24\u5bb3\u4e3aB\u7684\u7206\u70b8\u53ef\u4ee5\u628a\u4ed6\u6d88\u706d\u628a\u5b83\u6d88\u706d\n\t\tcnt += ceil(h&#91;i] - x * b, a - b);\n\t\t\/\/\u7528\u4f24\u5bb3\u4e3aA\u7684\u7206\u70b8\u5c06\u4ed6\u6d88\u706d\n\t}\n\treturn cnt &lt;= x;\n}\n\nint main() {\n\tcin >> n >> a >> b;\n\tfor (int i = 1; i &lt;= n; i++)\n\t\tcin >> h&#91;i];\n\n\tlong long  l = 0, r = 1e18, ans = -1;\n\twhile (l &lt;= r) {\n\t\tlong long mid = l + (r - l) \/ 2;\n\t\tif (check(mid)) {\n\t\t\tr = mid - 1;\n\t\t\tans = mid;\n\t\t} else {\n\t\t\tl = mid + 1;\n\t\t}\n\t}\n\tcout &lt;&lt; ans;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u4f60\u6b63\u5728\u6563\u6b65\u65f6\uff0c\u7a81\u7136\u51fa\u73b0\u4e86&nbsp;N&nbsp;\u53ea\u9b54\u7269\u3002\u6bcf\u53ea\u9b54\u7269\u62e5\u6709\u4e00\u4e2a\u79f0\u4e3a\u4f53\u529b\u7684\u6570\u503c\uff0c\u7b2c&nbsp;i&#038; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[24,25],"class_list":["post-168","post","type-post","status-publish","format-standard","hentry","category-oi","tag-24","tag-25"],"_links":{"self":[{"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=168"}],"version-history":[{"count":1,"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":169,"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=\/wp\/v2\/posts\/168\/revisions\/169"}],"wp:attachment":[{"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heroking2000.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}