{"id":120,"date":"2023-04-06T17:15:46","date_gmt":"2023-04-06T09:15:46","guid":{"rendered":"https:\/\/solost.cn\/?p=120"},"modified":"2023-04-06T17:15:46","modified_gmt":"2023-04-06T09:15:46","slug":"227","status":"publish","type":"post","link":"https:\/\/solost.cn\/?p=120","title":{"rendered":"Codeforces Round 256 (Div. 2) &#8211; D. Multiplication Table"},"content":{"rendered":"<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/image-17.png\" alt=\"image.png\" title=\"image.png\"><\/p>\n<h2>\u9898\u76ee\u94fe\u63a5<\/h2>\n<p><a href=\"https:\/\/codeforces.com\/problemset\/problem\/448\/D\">\u9898\u76ee\u94fe\u63a5<\/a><\/p>\n<h2>\u9898\u76ee\u5927\u610f<\/h2>\n<p>\u7ed9\u4f60\u4e00\u4e2an,m\u95ee\u4f60n*m\u4e2d\u7b2ck\u5927\u7684\u6570\u662f\u591a\u5c11<\/p>\n<h2>\u9898\u89e3<\/h2>\n<p>\u521a\u5f00\u59cb\u60f3\u7740\u5982\u4f55\u6570\u51fa\u6765\u662f\u7b2c\u51e0\u4e2a\uff0c\u7136\u540e\u867d\u7136\u60f3\u66b4\u529b\u4f46\u662f\u538b\u6839\u5b58\u4e0d\u4e86\uff0c5e5*5e5\u592a\u5927\u4e86\uff0c\u770b\u4e86\u9898\u89e3\u540e\u4e8c\u5206\uff0c\u4e8c\u5206\u8fd9\u4e2a\u7b54\u6848\uff0c\u6211\u4eec\u67e5\u7684\u6570\u662f\u7b2c\u51e0\u4e2a\u3002<\/p>\n<p>\u5982\u679c\u5f53\u524d\u6570\u662fx,\u90a3\u4e48\u6211\u4eec\u63a8\u7b97\u4ed6\u6bd4\u5c0f\u7684\u6570\u7684\u4e2a\u6570\uff0c\u6839\u636e\u4e58\u6cd5\u8868\u7684\u6027\u8d28\uff0c\u662f<code>1*1,1*2,1*3.....<\/code>\u7b2c\u4e00\u4e2a\u6570\u662f\u884c\u53f7\uff0c\u7b2c\u4e8c\u4e2a\u6570\u662f\u5217\uff0c\u5047\u8bbe\u73b0\u5728\u8fd9\u4e2a\u4e58\u6cd5\u8868\u662f<code>5 * 5<\/code>\uff0c\u90a3\u4e4811\u8fd9\u4e2a\u6570\u7684\u4f4d\u7f6e\u5c31\u662f<code>\u7b2c\u4e00\u884c:min(11\/i,m) = 5,\u56e0\u4e3a\u5217\u53f7\u6b63\u597d\u5c31\u662f\u8fd9\u4e00\u884c\u7684\u7b2c\u51e0\u4e2a\uff0c\u6240\u4ee5x\u9664\u5f53\u524d\u6570\u5c31\u662f\u7b2c\u51e0\u4e2a\u6570\uff0c\u4f46\u662f\u4e0d\u80fd\u6bd4\u5217\u7684\u6570\u76ee\u8fd8\u591a\uff0c\u7b2c\u4e8c\u884c:min(11\/2,m) = 5, \u7b2c\u4e09\u884c:min(11\/3,m) = 3,\u6240\u4ee5\u4ed6\u7684\u4f4d\u7f6e\u5c31\u662f5+5+3=13<\/code>\u66b4\u529b\u679a\u4e3e\u6bcf\u4e2a\u6570\u7684\u4f4d\u7f6e\uff0c\u7136\u540e\u7b97\u51fa\u6765\u7b2ck\u4e2a\u662f\u591a\u5c11\u5373\u53ef<\/p>\n<pre><code class=\"lang-cpp\">#include &lt;map&gt;\n#include &lt;set&gt;\n#include &lt;cmath&gt;\n#include &lt;queue&gt;\n#include &lt;stack&gt;\n#include &lt;vector&gt;\n#include &lt;bitset&gt;\n#include &lt;cstdio&gt;\n#include &lt;cstdlib&gt;\n#include &lt;cstring&gt;\n#include &lt;fstream&gt;\n#include &lt;iostream&gt;\n#include &lt;algorithm&gt;\n#include &lt;unordered_map&gt;\n#include &lt;unordered_set&gt;\n\nusing namespace std;\n#define x first\n#define y second\n#define endl &#039;\\n&#039;\n#define IOS                       \\\n    ios_base::sync_with_stdio(0); \\\n    cin.tie(0);                   \\\n    cout.tie(0);\ntypedef long long ll;\ntypedef pair&lt;ll, ll&gt; PLL;\ntypedef pair&lt;int, int&gt; PII;\n\nconst int INF = 0x3f3f3f3f, mod = 1000000007;\nconst int N = 2e5 + 10;\n\nll n, m, k;\n\nbool check(ll x){\n    ll sum = 0;\n    for(int i = 1; i &lt;= n; i++){\n        sum += min(x \/ i, m);\n    }\n    return sum &gt;= k;\n}\n\nvoid solve()\n{\n    cin &gt;&gt; n &gt;&gt; m &gt;&gt; k;\n    ll l = 1, r = n * m;\n    while(l &lt; r){\n        ll mid = l + r &gt;&gt; 1;\n        if(check(mid)) r = mid;\n        else l = mid + 1;\n    }\n    cout &lt;&lt; l &lt;&lt; endl;\n}\nint main()\n{\n    \/\/ IOS;\n    int t = 1;\n    \/\/ cin &gt;&gt; t;\n    while (t--) {\n        solve();\n    }\n    return 0;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u76ee\u94fe\u63a5 \u9898\u76ee\u94fe\u63a5 \u9898\u76ee\u5927\u610f \u7ed9\u4f60\u4e00\u4e2an,m\u95ee\u4f60n*m\u4e2d\u7b2ck\u5927\u7684\u6570\u662f\u591a\u5c11 \u9898\u89e3 \u521a\u5f00\u59cb\u60f3\u7740\u5982\u4f55\u6570\u51fa\u6765\u662f\u7b2c\u51e0\u4e2a\uff0c\u7136\u540e\u867d\u7136\u60f3\u66b4\u529b\u4f46\u662f\u538b\u6839\u5b58\u4e0d\u4e86\uff0c5e5*5e5\u592a\u5927\u4e86\uff0c\u770b\u4e86\u9898\u89e3\u540e\u4e8c\u5206\uff0c\u4e8c\u5206\u8fd9\u4e2a\u7b54\u6848\uff0c\u6211\u4eec\u67e5\u7684\u6570\u662f\u7b2c\u51e0\u4e2a\u3002 \u5982\u679c\u5f53\u524d\u6570\u662fx,\u90a3\u4e48\u6211\u4eec\u63a8\u7b97\u4ed6\u6bd4\u5c0f\u7684\u6570\u7684\u4e2a\u6570\uff0c\u6839\u636e\u4e58\u6cd5\u8868\u7684\u6027\u8d28\uff0c\u662f1*1,1*2,1*3.....\u7b2c\u4e00\u4e2a\u6570\u662f\u884c\u53f7\uff0c\u7b2c\u4e8c\u4e2a\u6570\u662f\u5217\uff0c\u5047\u8bbe\u73b0\u5728\u8fd9\u4e2a\u4e58\u6cd5\u8868\u662f5 * 5\uff0c\u90a3\u4e4811\u8fd9\u4e2a\u6570\u7684\u4f4d\u7f6e\u5c31\u662f\u7b2c\u4e00\u884c:min(11\/i,m) = 5,\u56e0\u4e3a\u5217\u53f7\u6b63\u597d\u5c31\u662f\u8fd9\u4e00\u884c\u7684\u7b2c\u51e0\u4e2a\uff0c\u6240\u4ee5x\u9664\u5f53\u524d\u6570\u5c31\u662f\u7b2c\u51e0\u4e2a\u6570\uff0c\u4f46\u662f\u4e0d\u80fd\u6bd4\u5217\u7684\u6570\u76ee\u8fd8\u591a\uff0c\u7b2c\u4e8c\u884c:min(11\/2,m) = 5, \u7b2c\u4e09\u884c:min(11\/3,m) = 3,\u6240\u4ee5\u4ed6\u7684\u4f4d\u7f6e\u5c31\u662f5+5+3=13\u66b4\u529b\u679a\u4e3e\u6bcf\u4e2a\u6570\u7684\u4f4d\u7f6e\uff0c\u7136\u540e\u7b97\u51fa\u6765\u7b2ck\u4e2a\u662f\u591a\u5c11\u5373\u53ef #include &lt;map&gt; #include &lt;set&gt; #include &lt;cmath&gt; #include &lt;queue&gt; #include &lt;stack&gt; #include &lt;vector&gt; #include &lt;bitset&gt; #include &lt;cstdio&gt; #include &lt;cstdlib&gt; #include &lt;cstring&gt; #include &lt;fstream&gt; #include &lt;iostream&gt; #include &lt;algorithm&gt; #include &lt;unordered_map&gt; #include &lt;unordered_set&gt; using namespace std; #define x first #define y second [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[39,5,46],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-solution","tag-39","tag-5","tag-46"],"_links":{"self":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=120"}],"version-history":[{"count":0,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/120\/revisions"}],"wp:attachment":[{"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}