{"id":314,"date":"2024-08-27T23:52:42","date_gmt":"2024-08-27T15:52:42","guid":{"rendered":"https:\/\/www.nenuacm.top\/?p=314"},"modified":"2024-10-17T01:35:57","modified_gmt":"2024-10-16T17:35:57","slug":"nenuoj-%e4%b9%8b-%e7%ae%97%e6%b3%952%e6%9f%a5%e6%89%bec","status":"publish","type":"post","link":"https:\/\/www.nenuacm.top\/index.php\/2024\/08\/27\/nenuoj-%e4%b9%8b-%e7%ae%97%e6%b3%952%e6%9f%a5%e6%89%bec\/","title":{"rendered":"NENUOJ \u4e4b \u7b97\u6cd52\u67e5\u627eC"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u524d\u8a00<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u5957\u9898\u7684\u6838\u5fc3\u5176\u5b9e\u5c31\u662f\u4e8c\u5206~<\/p>\n\n\n\n<p>\u867d\u7136\u6211\u4eec\u53ef\u4ee5\u7528\u4e00\u4e9b\u597d\u7528\u7684\u6570\u636e\u7ed3\u6784\u5077\u5077\u61d2\uff0c\u4f46\u662f\u4e8c\u5206\u8fd8\u662f\u5f97\u4f1a\u7684\uff01<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1264\">C001 \u5b57\u7b26\u4e32\u8ba1\u6570<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u7ed9\u51fam\u4e2a\u5b57\u7b26\u4e32\uff0c\u8981\u6c42\u8f93\u51fa\u91cd\u590dn\u6b21\u7684\u5b57\u7b26\u4e32\u6709\u51e0\u4e2a\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u5148\u7ed9\u5b9a\u4e00\u4e2aN\uff0cN\u2264100000\uff0c\u63a5\u7740\u8f93\u5165N\u4e2a\u5b57\u7b26\u4e32\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u5bf9\u4e8e\u6bcf\u7ec4\u6d4b\u8bd5\u6570\u636e\uff0c\u8f93\u51fa\u82e5\u5e72\u884c\uff0c\u6bcf\u884c\u4e24\u4e2a\u6b63\u6574\u6570\uff0c\u7b2c\u4e00\u4e2a\u6570\u8868\u793a\u91cd\u590d\u7684\u6b21\u6570\uff0c\u7b2c\u4e8c\u4e2a\u6570\u8868\u793a\u5728\u6b64\u91cd\u590d\u6b21\u6570\u4e0b\u6709\u51e0\u79cd\u4e0d\u540c\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">5<br>BBA<br>BBA<br>BEA<br>DEC<br>CCF<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">1 3<br>2 1<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u9898\u6211\u770b\u7f51\u4e0a\u7684\u5199\u6cd5\u90fd\u597d\u590d\u6742\u2026\u2026\u7b14\u8005\u8fd9\u91cc\u7528map\u548cset\u4f7f\u4ee3\u7801\u957f\u5ea6\u5927\u5927\u964d\u4f4e\uff01\u3010\u7406\u89e3\u96be\u5ea6++\u3011\u5176\u5b9e\u5c31\u662f\u7528map\u53bb\u8bb0\u5f55\u4e0d\u540c\u5b57\u7b26\u4e32\u7684\u51fa\u73b0\u6b21\u6570\u548c\u7528set\u7684\u53bb\u91cd\u4ee5\u53ca\u6392\u5e8f\u7684\u80fd\u529b\u53bb\u8bb0\u5f55\u6709\u54ea\u4e9b\u51fa\u73b0\u6b21\u6570\u3002\u7136\u540e\u5c31\u662f\u6309\u7167set\u91cc\u90a3\u4e9b\u51fa\u73b0\u6b21\u6570\u3010\u5bf9\u5e94\u7684\u7b2c\u4e00\u4e2a\u8f93\u51fa\u3011\u53bbmap\u91cc\u627e\u76f8\u540c\u51fa\u73b0\u6b21\u6570\u7684\u5b57\u7b26\u4e32\u6709\u51e0\u4e2a\u3010\u7528map\u7684\u7b2c\u4e8c\u9879\u627e\u7b2c\u4e00\u9879\u7684\u4e2a\u6570\u3011\u3010\u5bf9\u5e94\u7b2c\u4e8c\u4e2a\u8f93\u51fa\u3011\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\nmap&lt;string,int&gt; mp; \/\/ \u8bb0\u5f55\u6bcf\u4e2a\u5b57\u7b26\u4e32\u51fa\u73b0\u51e0\u6b21\nset&lt;int&gt; st; \/\/ \u8bb0\u5f55\u6709\u51e0\u79cd\u51fa\u73b0\u6b21\u6570\nint main(){\n &nbsp; &nbsp;int n;\n &nbsp; &nbsp;cin &gt;&gt; n;\n &nbsp; &nbsp;\n &nbsp; &nbsp;for(int i = 1;i &lt;= n;i++){\n &nbsp; &nbsp; &nbsp; &nbsp;string s;\n &nbsp; &nbsp; &nbsp; &nbsp;cin &gt;&gt; s;\n &nbsp; &nbsp; &nbsp; &nbsp;mp&#91;s]++;\n &nbsp;  }\n &nbsp; &nbsp;for(auto &amp;it : mp){\n &nbsp; &nbsp; &nbsp; &nbsp;st.insert(it.second);\n &nbsp;  }\n &nbsp; &nbsp;for(auto it : st){\n &nbsp; &nbsp; &nbsp; &nbsp;cout &lt;&lt; it &lt;&lt; \" \";\n &nbsp; &nbsp; &nbsp; &nbsp;int cnt = 0;\n &nbsp; &nbsp; &nbsp; &nbsp;for(auto &amp;i : mp){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(i.second == it){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cnt++;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp; &nbsp;cout &lt;&lt; cnt &lt;&lt; \"\\n\";\n &nbsp;  }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1265\">C002 \u8d4c\u5f92<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>N\u4e2a\u8d4c\u5f92\u4e00\u8d77\u51b3\u5b9a\u73a9\u4e00\u4e2a\u6e38\u620f\uff1a \u6e38\u620f\u521a\u5f00\u59cb\u7684\u65f6\u5019\uff0c\u6bcf\u4e2a\u8d4c\u5f92\u628a\u8d4c\u6ce8\u653e\u5728\u684c\u4e0a\u5e76\u906e\u4f4f\uff0c\u4f8d\u8005\u8981\u67e5\u770b\u6bcf\u4e2a\u4eba\u7684\u8d4c\u6ce8\u5e76\u786e\u4fdd\u6bcf\u4e2a\u4eba\u7684\u8d4c\u6ce8\u90fd\u4e0d\u4e00\u6837\u3002\u5982\u679c\u4e00\u4e2a\u8d4c\u5f92\u6ca1\u94b1\u4e86\uff0c\u5219\u4ed6\u8981\u501f\u4e00\u4e9b\u7b79\u7801\uff0c\u56e0\u6b64\u4ed6\u7684\u8d4c\u6ce8\u4e3a\u8d1f\u6570\u3002\u5047\u5b9a\u8d4c\u6ce8\u90fd\u662f\u6574\u6570\u3002 \u6700\u540e\u8d4c\u5f92\u4eec\u63ed\u5f00\u76d6\u5b50\uff0c\u51fa\u793a\u4ed6\u4eec\u7684\u8d4c\u6ce8\u3002\u5982\u679c\u8c01\u4e0b\u7684\u8d4c\u6ce8\u662f\u5176\u4ed6\u8d4c\u5f92\u4e2d\u67d03\u4e2a\u4eba\u4e0b\u7684\u8d4c\u6ce8\u4e4b\u548c\uff0c\u5219\u4ed6\u662f\u80dc\u5229\u8005\u3002\u5982\u679c\u6709\u591a\u4e8e\u4e00\u4e2a\u80dc\u5229\u8005\uff0c\u5219\u4e0b\u7684\u8d4c\u6ce8\u6700\u5927\u7684\u8d4c\u5f92\u624d\u662f\u6700\u7ec8\u7684\u80dc\u5229\u8005\u3002 \u4f8b\u5982\uff0c\u5047\u5b9a\u8d4c\u5f92\u4e3a\uff1aTom\u3001Bill\u3001John\u3001Roger\u548cBush\uff0c\u4ed6\u4eec\u4e0b\u7684\u8d4c\u6ce8\u5206\u522b\u4e3a\uff1a2\u30013\u30015\u30017\u548c12 \u3002\u56e0\u6b64\u6700\u7ec8\u83b7\u80dc\u7684\u662fBush\uff08\u5e76\u4e14\u6ca1\u6709\u5176\u4ed6\u4eba\u662f\u80dc\u5229\u8005\uff09\uff0c\u56e0\u4e3a\u4ed6\u4e0b\u7684\u8d4c\u6ce8\u4e3a12\uff0c\u800c\u5176\u4ed6\u7684\u4eba\u4e0b\u7684\u8d4c\u6ce8\u4e4b\u548c\u4e5f\u7b49\u4e8e12\uff1a2+3+7=12\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u8f93\u5165\u6587\u4ef6\u4e2d\u5305\u542b\u4e86\u591a\u7ec4\u8d4c\u5f92\u4e0b\u7684\u8d4c\u6ce8\u3002\u6bcf\u7ec4\u8d4c\u6ce8\u7684\u6570\u636e\u7b2c1\u884c\u662f\u4e00\u4e2a\u6574\u6570n,1&lt;=n&lt;=1000,\u4ee3\u8868\u8d4c\u5f92\u7684\u4e2a\u6570\uff0c\u7136\u540e\u662f\u4ed6\u4eec\u4e0b\u7684\u8d4c\u6ce8\uff0c\u6bcf\u4e2a\u4eba\u7684\u8d4c\u6ce8\u5360\u4e00\u884c\uff0c\u8fd9\u4e9b\u8d4c\u6ce8\u5404\u4e0d\u76f8\u540c\uff0c\u5e76\u4e14\u8303\u56f4\u662f[-536870912,+536870911]\u3002\u8f93\u5165\u6587\u4ef6\u7684\u6700\u540e\u4e00\u884c\u4e3a0\uff0c\u4ee3\u8868\u8f93\u5165\u7ed3\u675f\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u5bf9\u6bcf\u7ec4\u8d4c\u6ce8\uff0c\u8f93\u51fa\u80dc\u5229\u8005\u4e0b\u7684\u8d4c\u6ce8\uff0c\u5982\u679c\u6ca1\u6709\u89e3\uff0c\u5219\u8f93\u51fa\u201cno solution\u201d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">5<br>2 <br>3 <br>5 <br>7 <br>12<br>5<br>2 <br>16 <br>64 <br>256 <br>1024<br>0<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">12<br>no solution<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u9053\u9898\u5176\u5b9e\u5c31\u662f\u66b4\u529b\uff01\u5927\u80c6\u56db\u5c42\u5faa\u73af\u5c31\u80fd\u8fc7~<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\nint a&#91;10000];\n\u200b\nint main(){\n &nbsp; &nbsp;int n;\n &nbsp; &nbsp;while(cin &gt;&gt; n){\n &nbsp; &nbsp; &nbsp; &nbsp;if(!n) break;\n &nbsp; &nbsp; &nbsp; &nbsp;for(int i = 1;i &lt;= n;i++){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cin &gt;&gt; a&#91;i];\n &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp; &nbsp;int maxx = INT_MIN;\n &nbsp; &nbsp; &nbsp; &nbsp;for(int i = 1;i &lt;= n;i++){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int j = 1;j &lt;= n;j++){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int k = 1;k &lt;= n;k++){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int l = 1;l &lt;= n;l++){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(i!=j &amp;&amp; i!=k &amp;&amp; i!=l &amp;&amp; j!=k &amp;&amp; j!=l &amp;&amp; k!=l){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(a&#91;i] == a&#91;j] + a&#91;k] + a&#91;l])\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;maxx = max(maxx,a&#91;i]);\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp; &nbsp;if(maxx != INT_MIN){\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout &lt;&lt; maxx &lt;&lt; \"\\n\";\n &nbsp; &nbsp; &nbsp;  }else{\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cout &lt;&lt; \"no solution\\n\";\n &nbsp; &nbsp; &nbsp;  }\n &nbsp;  }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1266\">C003 \u534a\u7d20\u6570<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u7d20\u6570\u7684\u5b9a\u4e49\uff1a\u5bf9\u4e8e\u4e00\u4e2a\u5927\u4e8e\uff11\u7684\u6b63\u6574\u6570\uff0c\u5982\u679c\u9664\u4e86\uff11\u548c\u5b83\u672c\u8eab\u6ca1\u6709\u5176\u4ed6\u7684\u6b63\u7ea6\u6570\u4e86\uff0c\u90a3\u4e48\u8fd9\u4e2a\u6570\u5c31\u79f0\u4e3a\u7d20\u6570\u3002\u4f8b\u5982\uff0c2,11,67,89\u662f\u7d20\u6570\uff0c8,20,27\u4e0d\u662f\u7d20\u6570\u3002 \u534a\u7d20\u6570\u7684\u5b9a\u4e49\uff1a\u5bf9\u4e8e\u4e00\u4e2a\u5927\u4e8e1\u7684\u6b63\u6574\u6570\uff0c\u5982\u679c\u5b83\u53ef\u4ee5\u88ab\u5206\u89e3\u62102\u4e2a\u7d20\u6570\u7684\u4e58\u79ef\uff0c\u5219\u79f0\u8be5\u6570\u4e3a\u534a\u7d20\u6570\uff0c\u4f8b\u59826\u662f\u4e00\u4e2a\u534a\u7d20\u6570\uff0c\u800c12\u4e0d\u662f\u3002 \u4f60\u7684\u4efb\u52a1\u662f\u5224\u65ad\u4e00\u4e2a\u6570\u662f\u5426\u662f\u534a\u7d20\u6570\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u8f93\u5165\u6587\u4ef6\u4e2d\u6709\u591a\u4e2a\u6d4b\u8bd5\u6570\u636e\uff0c\u6bcf\u4e2a\u6d4b\u8bd5\u6570\u636e\u5305\u542b\u4e00\u4e2a\u6574\u6570N\uff0c2&lt;=N&lt;=1,000,000\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u5bf9\u6bcf\u4e2a\u6d4b\u8bd5\u6570\u636e\uff0c\u5982\u679cN\u662f\u534a\u7d20\u6570\uff0c\u5219\u8f93\u51faYES\uff0c\u5426\u5219\u8f93\u51faNO\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">3<br>4<br>6<br>12<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">NO<br>YES<br>YES<br>NO<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u9053\u9898\u5c31\u6309\u9898\u610f\u6a21\u62df\u5373\u53ef~<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\nbool isPrime(int n){\n    if(n &lt;= 1) return false;\n    if(n == 2) return true;\n    for(int i = 2;i * i &lt;= n;i++){\n        if(n % i == 0) return false;\n    }\n    return true;\n}\nint main(){\n    int n;\n    while(cin &gt;&gt; n){\n        int flag = 0;\n        for(int i = 2;i &lt;= n;i++){\n            for(int j = 2;j &lt;= n;j++){\n                if(i * j == n &amp;&amp; isPrime(i) &amp;&amp; isPrime(j)){\n                    flag = 1;\n                }\n            }\n        }\n        if(flag) cout &lt;&lt; \"YES\\n\";\n        else cout &lt;&lt; \"NO\\n\";\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1267\">C004 \u68cd\u5b50\u7684\u81a8\u80c0<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u5f53\u4e00\u6839\u957f\u5ea6\u4e3aL\u7684\u7ec6\u957f\u91d1\u5c5e\u68cd\u5b50\u52a0\u70edn\u5ea6\u540e\uff0c\u5b83\u4f1a\u81a8\u80c0\u5230\u4e00\u4e2a\u65b0\u7684\u957f\u5ea6L\u2019=(1+n<em>C)<\/em>L,\u5176\u4e2dC\u4e3a\u8be5\u91d1\u5c5e\u7684\u70ed\u81a8\u80c0\u7cfb\u6570\u3002 \u5f53\u4e00\u6839\u7ec6\u957f\u7684\u91d1\u5c5e\u68cd\u5b50\u56fa\u5b9a\u5728\u4e24\u5835\u5899\u4e4b\u95f4\uff0c\u7136\u540e\u52a0\u70ed\uff0c\u5219\u68cd\u5b50\u4f1a\u53d8\u6210\u5706\u5f13\u5f62\uff0c\u68cd\u5b50\u7684\u539f\u59cb\u4f4d\u7f6e\u4e3a\u8be5\u5706\u5f13\u5f62\u7684\u5f26\uff0c\u5982\u56fe\u6240\u793a\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.nenuacm.top\/wp-content\/uploads\/2024\/08\/image-1.jpeg'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"270\" height=\"209\" data-original=\"https:\/\/www.nenuacm.top\/wp-content\/uploads\/2024\/08\/image-1.jpeg\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"C004.jpg\" class=\"wp-image-317\"\/><\/div><\/figure>\n\n\n\n<p>\u56fe \u81a8\u80c0\u7684\u91d1\u5c5e\u68cd\u5b50\uff08\u4e0a\u4e3a\u81a8\u80c0\u524d\uff0c\u4e0b\u4e3a\u81a8\u80c0\u540e\uff09 \u4f60\u7684\u4efb\u52a1\u662f\u8ba1\u7b97\u68cd\u5b50\u4e2d\u5fc3\u7684\u504f\u79bb\u8ddd\u79bb\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u8f93\u5165\u6587\u4ef6\u5305\u542b\u591a\u4e2a\u6d4b\u8bd5\u6570\u636e\uff0c\u6bcf\u4e2a\u6d4b\u8bd5\u6570\u636e\u5360\u4e00\u884c\u3002\u6bcf\u4e2a\u6d4b\u8bd5\u6570\u636e\u5305\u542b3\u4e2a\u975e\u8d1f\u6574\u6570\uff1a\u68cd\u5b50\u7684\u521d\u59cb\u957f\u5ea6\uff0c\u5355\u4f4d\u4e3a\u6beb\u7c73\uff1b\u52a0\u70ed\u524d\u540e\u7684\u6e29\u5dee\uff0c\u5355\u4f4d\u4e3a\u5ea6\uff1b\u8be5\u91d1\u5c5e\u7684\u70ed\u81a8\u80c0\u7cfb\u6570\u3002\u8f93\u5165\u6570\u636e\u4fdd\u8bc1\u81a8\u80c0\u7684\u957f\u5ea6\u4e0d\u8d85\u8fc7\u68cd\u5b50\u672c\u8eab\u957f\u5ea6\u7684\u4e00\u534a\u3002\u8f93\u5165\u6587\u4ef6\u7684\u6700\u540e\u4e00\u884c\u4e3a3\u4e2a\u8d1f\u6570\uff0c\u4ee3\u8868\u8f93\u5165\u7ed3\u675f\uff0c\u8be5\u6d4b\u8bd5\u6570\u636e\u4e0d\u9700\u5904\u7406\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u5bf9\u6bcf\u4e2a\u6d4b\u8bd5\u6570\u636e\uff0c\u8f93\u51fa\u91d1\u5c5e\u68cd\u5b50\u4e2d\u5fc3\u52a0\u70ed\u540e\u504f\u79bb\u7684\u8ddd\u79bb\uff0c\u5355\u4f4d\u4e3a\u6beb\u7c73\uff0c\u4fdd\u7559\u5c0f\u6570\u70b9\u540e3\u4f4d\u6709\u6548\u6570\u5b57\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">1000 100 0.0001<br>15000 10 0.00006<br>10 0 0.001<br>-1 -1 -1<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">61.329<br>225.020<br>0.000<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u9053\u9898\u7528\u4e09\u89d2\u51fd\u6570\u53bb\u7b97\uff0c\u4e5f\u5c31\u662f\u8003\u8651\u5230\u8fd9\u4e48\u4e00\u4e2a\u5706\u5f27\uff08\u4e0d\u80fd\u8ba4\u4e3a\u662f\u4e09\u89d2\u5f62\uff0c\u5426\u5219\u8bef\u5dee\u592a\u5927\uff09\uff0c\u7136\u540e\u901a\u8fc7\u6570\u5b66\u8ba1\u7b97\uff08\u8bfb\u8005\u81ea\u884c\u753b\u753b\u56fe\uff09\u53bb\u5f97\u51fa\u504f\u79fb\u91cf\uff0c\u7136\u540e\u7528\u4e8c\u5206\u53bb\u7b97\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u8fd9\u9053\u9898\u7684\u7cbe\u5ea6\u9700\u8981\u8c03\u9ad8\u4e00\u70b9~<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\n\nconst double PI = acos(-1.0);\nconst double EPS = 1e-12; \n\n\nint main() {\n    double l, n, c, len;\n    \n    while (cin &gt;&gt; l &gt;&gt; n &gt;&gt; c) {\n        if (l &lt; 0 || n &lt; 0 || c &lt; 0) break;\n        \n        if (l &lt;= EPS || n &lt;= EPS || c &lt;= EPS) {\n            cout &lt;&lt; fixed &lt;&lt; setprecision(3) &lt;&lt; \"0.000\" &lt;&lt; \"\\n\";\n            continue;\n        }\n\n        len = (1.0 + n * c) * l;\n\n        double low = 0;\n        double high = PI;\n        double mid;\n        \n        \/\/ \u4e8c\u5206\u53bb\u903c\u8fd1\n        while (high - low &gt; EPS) {\n            mid = (high + low) \/ 2;\n            double temp = (l * mid) \/ (sin(mid \/ 2) * 2);\n            if (temp &gt;= len) high = mid;\n            else low = mid;\n        }\n\n        cout &lt;&lt; fixed &lt;&lt; setprecision(3) &lt;&lt; (l \/ 2) * tan(mid \/ 4) &lt;&lt; \"\\n\";\n    }\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1268\">C005 \u7535\u7f06\u4e3b<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u5976\u725b\u7684\u5c45\u6c11\u51b3\u5b9a\u4e3e\u529e\u4e00\u573a\u7f16\u7a0b\u533a\u57df\u8d5b\u3002\u88c1\u5224\u59d4\u5458\u4f1a\u81ea\u544a\u594b\u52c7\u5e76\u5ba3\u79f0\u8981\u4e3e\u529e\u6709\u53f2\u4ee5\u6765\u6700\u516c\u6b63\u7684\u6bd4\u8d5b\u3002\u961f\u5458\u4eec\u7684\u7535\u8111\u91c7\u7528\u201c\u661f\u578b\u201d\u62d3\u6251\u7ed3\u6784\u4e92\u8fde\uff08\u4e5f\u5c31\u662f\u8bf4\u8981\u628a\u6240\u6709\u7535\u8111\u90fd\u8fde\u5728\u4e00\u4e2a\u4e2d\u592e\u96c6\u7ebf\u5668\u4e0a\uff09\u3002\u4e3a\u4e86\u8ba9\u6bd4\u8d5b\u5c3d\u53ef\u80fd\u516c\u6b63\uff0c\u88c1\u5224\u59d4\u5458\u4f1a\u7684\u5934\u5934\u4eec\u51b3\u5b9a\uff1a\u5c06\u6bd4\u8d5b\u961f\u5458\u4eec\u5e73\u5747\u5730\u5b89\u7f6e\u5728\u96c6\u7ebf\u5668\u5468\u56f4\uff0c\u8ddd\u79bb\u96c6\u7ebf\u5668\u6709\u4e00\u4e2a\u76f8\u540c\u7684\u8ddd\u79bb\u3002 \u88c1\u5224\u59d4\u5458\u4f1a\u4e3a\u4e86\u91c7\u4e70\u7f51\u7edc\u7535\u7f06\uff0c\u8054\u7cfb\u4e86\u4e00\u5bb6\u5f53\u5730\u7684\u7f51\u7edc\u65b9\u6848\u63d0\u4f9b\u5546\uff0c\u8981\u6c42\u4ed6\u4eec\u63d0\u4f9b\u4e00\u4e9b\u767b\u7b49\u957f\u7684\u7535\u7f06\u3002\u8fd9\u4e9b\u7535\u7f06\u5e94\u8d8a\u957f\u8d8a\u597d\uff0c\u4ece\u800c\u4f7f\u5f97\u961f\u5458\u4eec\u4e0e\u5176\u4ed6\u961f\u5458\u7684\u8ddd\u79bb\u8d8a\u5927\u3002 \u8fd9\u5bb6\u516c\u53f8\u7684\u7535\u7f06\u5de5\u6765\u529e\u8fd9\u4ef6\u4e8b\u3002\u4ed6\u77e5\u9053\u4ed3\u5e93\u91cc\u6bcf\u4e2a\u7535\u7f06\u7684\u957f\u5ea6\uff08\u7cbe\u786e\u5230\u5398\u7c73\uff09\u3002\u4ed6\u6bcf\u6b21\u5207\u5272\u7535\u7f06\u65f6\u7684\u7cbe\u5ea6\u4e5f\u662f\u5398\u7c73\u3002\u4f46\u4ed6\u73b0\u5728\u4e0d\u77e5\u5207\u591a\u5c11\uff0c\u6240\u4ee5\u5b8c\u5168\u832b\u7136\u4e2d\u3002 \u4f60\u8981\u5199\u4e2a\u7a0b\u5e8f\u8ba1\u7b97\u51fa\u4e00\u6761\u7535\u7f06\u6700\u591a\u591a\u957f\u4f7f\u4e4b\u53ef\u4ee5\u63d0\u4f9b\u4e00\u5b9a\u80fd\u591f\u6570\u76ee\u7684\u7535\u7f06\uff0c\u5e2e\u7740\u8fd9\u4f4d\u7535\u7f06\u5de5\u5b8c\u6210\u4efb\u52a1\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u7b2c\u4e00\u884c\u662f\u4e24\u4e2a\u6574\u6570N\u548cK\uff0cN\uff081&lt;=N&lt;=10000\uff09\u662f\u4ed3\u5e93\u91cc\u7684\u7535\u7f06\u6570\uff0cK\uff081&lt;=K&lt;=10000\uff09\u662f\u6240\u9700\u7535\u7f06\u6570\u3002\u63a5\u4e0b\u6765\u7684N\u884c\u6bcf\u4e00\u884c\u4e00\u4e2a\u6570\uff0c\u8868\u793a\u7535\u7f06\u7684\u957f\u5ea6\uff08\u5355\u4f4d\u662f\u7c73\uff09\u3002\u7535\u7f06\u957f\u5ea6\u6700\u5c0f\u4e3a1\u7c73\uff0c\u6700\u5927\u4e3a100\u5343\u7c73\u3002\u6bcf\u4e2a\u8868\u793a\u957f\u5ea6\u7684\u6570\u5747\u8868\u793a\u4e3a\u5e26\u4e24\u4f4d\u5c0f\u6570\u7684\u6d6e\u70b9\u6570\uff08\u5373\u7cbe\u786e\u5230\u5398\u7c73\uff09\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u6240\u9700\u7684\u7535\u7f06\u4e00\u6761\u6700\u957f\u6709\u591a\u5c11\u7c73\uff08\u7cbe\u786e\u5230\u5398\u7c73\uff0c\u5373\u4fdd\u7559\u5c0f\u6570\u70b9\u4e24\u4f4d\uff09\u3002\u5982\u679c\u4e0d\u80fd\u63d0\u4f9bK\u6761\u5927\u4e8e\u7b49\u4e8e1\u5398\u7c73\u7684\u7b49\u957f\u7535\u7f06\u5c31\u8f93\u51fa\u201c0.00\u201d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">4 11<br>8.02<br>7.43<br>4.57<br>5.39<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">2.00<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u6700\u5f00\u59cb\u8bfb\u9898\u7684\u65f6\u5019\uff0c\u5176\u5b9e\u89c9\u5f97\u6709\u70b9\u96be\u61c2\uff0c\u5176\u5b9e\u5c31\u662f\u95ee\u4f60\uff0c\u5982\u679c\u6bcf\u4e00\u6bb5\u7535\u7f06\u7684\u957f\u5ea6\u4e3axxx\uff0c\u80fd\u5426\u88c1\u51fak\u6bb5\u7535\u7f06\uff08\u4ece\u8bfb\u5165\u7684\u6240\u6709\u7535\u7f06\u4e2d\uff09\u3002<\/p>\n\n\n\n<p>\u8fd9\u9053\u9898\u5176\u5b9e\u770b\u5b8c\u5c31\u53ef\u4ee5\u60f3\u5230\u4e8c\u5206\u4e86\uff0c\u56e0\u4e3a\u8fd9\u662f\u4e2a\u8fde\u7eed\u7684\u4e8b\u60c5\uff1a\u7535\u7f06\u957f\u5ea6\u8d8a\u5927\uff0c\u7535\u7f06\u6570\u91cf\u8d8a\u5c11\u3002\u6240\u4ee5\u6211\u4eec\u8981\u627e\u5230\u4e00\u4e2a\u5408\u9002\u7684\u957f\u5ea6\uff0c\u8ba9\u7535\u7f06\u6570\u91cf\u6ee1\u8db3\u9898\u610f\uff0c\u5e76\u4e14\u5c3d\u53ef\u80fd\u5730\u5927\u3002<\/p>\n\n\n\n<p>\u7279\u5224\u597d\u50cf\u4e0d\u7528\u7ba1\u3010\u96fe\u3011<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\ndouble a&#91;10005];\nint n,k;\ndouble eps = 1e-12;\nbool check(double mid){\n    int cnt = 0;\n    for(int i = 1;i &lt;= n;i++){\n        cnt += a&#91;i] \/ mid;\n    }\n    return cnt &gt;= k;\n}\nint main(){\n    \n    cin &gt;&gt; n &gt;&gt; k;\n    double maxx = 0;\n    for(int i = 1;i &lt;= n;i++){\n        cin &gt;&gt; a&#91;i];\n        maxx = max(maxx,a&#91;i]);\n    }\n    \n    double l = 0;\n    double r = maxx;\n    while(r - l &gt; eps){\n        double mid = (l + r) \/ 2.0;\n        if(check(mid)){\n            l = mid;\n        }else{\n            r = mid;\n        }\n    }\n    cout &lt;&lt; fixed &lt;&lt; setprecision(2) &lt;&lt; l &lt;&lt; \"\\n\";\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1269\">C006 \u5b9d\u8d1d\u9c7c<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u4f60\u521a\u521a\u4ece\u5976\u725b\u642c\u5230\u4e00\u4e2a\u5927\u57ce\u5e02\u91cc\u3002\u8fd9\u91cc\u7684\u4eba\u8bf4\u4e00\u79cd\u8ba9\u4eba\u7406\u89e3\u4e0d\u80fd\u7684\u5916\u6587\u65b9\u8a00\u3002\u4e07\u5e78\uff0c\u4f60\u6709\u672c\u5b57\u5178\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7406\u89e3\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u8f93\u5165\u5305\u542b\u591a\u8fbe100\uff0c000\u4e2a\u5b57\u5178\u8bcd\u6761\uff0c\u7136\u540e\u662f\u4e00\u4e2a\u7a7a\u884c\uff0c\u7136\u540e\u662f\u4e00\u6761\u6d88\u606f\uff0c\u8fd9\u6761\u6d88\u606f\u5305\u542b\u591a\u8fbe100\uff0c000\u4e2a\u5355\u8bcd\u3002\u6bcf\u4e2a\u8bcd\u6761\u5360\u4e00\u884c\uff0c\u5148\u662f\u4e00\u4e2a\u82f1\u8bed\u5355\u8bcd\uff0c\u7136\u540e\u662f\u4e00\u4e2a\u7a7a\u683c\uff0c\u7136\u540e\u662f\u4e00\u4e2a\u5916\u6587\u65b9\u8a00\u8bcd\u3002\u4e00\u4e2a\u65b9\u8a00\u8bcd\u5728\u5b57\u5178\u4e2d\u51fa\u73b0\u4e0d\u8d85\u8fc7\u4e00\u6b21\u3002\u6d88\u606f\u662f\u4e00\u4e2a\u5916\u6587\u65b9\u8a00\u8bcd\u5e8f\u5217\uff0c\u4e00\u4e2a\u8bcd\u5360\u4e00\u884c\u3002\u6bcf\u4e2a\u8bcd\u662f\u4e00\u4e2a\u6700\u957f\u4e3a10\u7684\u5c0f\u5199\u5b57\u6bcd\u5e8f\u5217\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u5c06\u6d88\u606f\u7684\u5916\u6587\u8bcd\u7ffb\u8bd1\u6210\u82f1\u8bed\uff0c\u4e00\u4e2a\u8bcd\u4e00\u884c\u3002\u67e5\u4e0d\u5230\u7684\u8bcd\u5e94\u8be5\u7ffb\u8bd1\u6210\u201ceh\u201d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">dog ogday<br>cat atcay<br>pig igpay<br>froot ootfray<br>loops oopslay<br><br>atcay<br>ittenkay<br>oopslay<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">cat<br>eh<br>loops<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>map\u7684\u7b80\u5355\u5b9e\u73b0~\u5982\u679c\u719f\u6089map\u7684\u4f7f\u7528\uff0c\u5e94\u8be5\u4e0d\u9700\u8981\u4ec0\u4e48\u601d\u8003\u7684\u3002<\/p>\n\n\n\n<p>\u5f53\u7136\uff0c\u5982\u679c\u4e0d\u7528map\u7684\u8bdd\uff0c\u8fd9\u9053\u9898\u7684\u601d\u8def\u5e94\u8be5\u662f\uff0c\u8bfb\u5165\u6240\u6709\u5b57\u5178\uff08\u7ed3\u6784\u4f53\u5904\u7406\uff09\uff0c\u7136\u540e\u8fdb\u884c\u7ed3\u6784\u4f53\u6392\u5e8f\uff0c\u6700\u540e\u4f7f\u7528\u4e8c\u5206\u53bb\u5b57\u5178\u7ed3\u6784\u4f53\u6570\u7ec4\u91cc\u67e5\u627e\u662f\u5426\u5b58\u5728\u8be5\u5355\u8bcd\u3002\u4f46\u662f\u8fd9\u4e2a\u5199\u6cd5\u592a\u9ebb\u70e6\u4e86\uff0c\u8bfb\u8005\u53ef\u4ee5\u81ea\u884c\u5b9e\u73b0~<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\nint main(){\n    map&lt;string,string&gt; mp;\n    string s;\n    while(getline(cin,s)){\n        if(s == \"\\0\") break;\n        string a = \"\",b = \"\";\n        int flag = 0;\n        for(int i = 0;i &lt; s.size();i++){\n            if(s&#91;i] == ' '){\n                flag = 1;\n                continue;\n            }\n            if(!flag) a += s&#91;i];\n            else b += s&#91;i];\n        }\n        mp&#91;b] = a;\n    }\n    while(cin &gt;&gt; s){\n        if(mp.find(s) != mp.end()){\n            cout &lt;&lt; mp&#91;s] &lt;&lt; \"\\n\";\n        }else{\n            cout &lt;&lt; \"eh\\n\";\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1270\">C007 \u661f\u7a7a<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u5c06\u591c\u7a7a\u62bd\u8c61\u6210\u4e8c\u7ef4\u5e73\u9762\uff0c\u6bcf\u4e2a\u661f\u661f\u4e00\u4e2a(X,Y)\u5750\u6807\u3002\u8fd9\u4e9b\u70b9\u53ef\u4ee5\u5f62\u6210\u591a\u5c11\u6b63\u65b9\u5f62\uff1f<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u591a\u7ec4\u8f93\u5165\u3002\u5bf9\u4e8e\u6bcf\u7ec4\u6570\u636e\uff0c\u7b2c\u4e00\u884c\u662fn\uff081&lt;=n&lt;=1000\uff09\u8868\u793a\u5df2\u77e5\u661f\u661f\u6570\uff0c\u7136\u540e\u662fn\u884c\uff0c\u6bcf\u884c\u4e00\u4e2a\u5750\u6807\u503c\u3002\u5750\u6807\u7edd\u5bf9\u503c\u5c0f\u4e8e20000\u3002n=0\u8868\u793a\u7ed3\u675f\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u5bf9\u4e8e\u6bcf\u7ec4\u6570\u636e\u8f93\u51fa\u5f62\u6210\u6b63\u65b9\u5f62\u7684\u4e2a\u6570\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">4<br>1 0<br>0 1<br>1 1<br>0 0<br>0<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">1<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u9053\u9898\u5c31\u662f\u8bfb\u5165\u7ed3\u6784\u4f53\uff0c\u7136\u540e\u53bb\u53cc\u5faa\u679a\u4e3e\u70b9\uff0c\u7136\u540e\u53bb\u5047\u8bbe\u679a\u4e3e\u7684\u4e24\u4e2a\u70b9\u662f\u6b63\u65b9\u5f62\u7684\u4e00\u6761\u8fb9\uff0c\u53bb\u5bfb\u627e\u53e6\u5916\u4e24\u4e2a\u70b9\u662f\u5426\u5b58\u5728\u3010\u53ef\u4ee5\u901a\u8fc7\u73b0\u6709\u70b9\u63a8\u51fa\u3011\u3002\u7b14\u8005\u539f\u672c\u7684\u5199\u6cd5\u662f\u7528set\u6392\u5e8f\uff0c\u7136\u540e\u7528set\u5185\u7f6e\u7684\u67e5\u8be2\u53bbcount\u3002\u4f46\u662f\u4e0d\u77e5\u9053\u4e3a\u4f55\u4f1awa\uff0c\u53ef\u80fd\u662f\u54ea\u91cc\u6ca1\u8003\u8651\u5230\uff1f\u6240\u4ee5\u8fd8\u662f\u6362\u6210\u4e86\u4e8c\u5206\u7684\u5199\u6cd5\uff0c\u5373\u53bb\u6240\u6709\u70b9\u91cc\u4e8c\u5206\u67e5\u627e\u3010\u4e8c\u5206\u7684\u524d\u63d0\u662f\u6392\u5e8f\u3011\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;bits\/stdc++.h&gt;\nusing namespace std;\n \nstruct node {\n    int x, y;\n};\n \nbool cmp(const node &amp;a, const node &amp;b) {\n    if (a.x == b.x) return a.y &lt; b.y;\n    return a.x &lt; b.x;\n}\n \nbool find(const vector&lt;node&gt; &amp;stars, int x, int y) {\n \n    int left = 0, right = stars.size() - 1;\n    while (left &lt;= right) {\n        int mid = left + (right - left) \/ 2;\n        if (stars&#91;mid].x == x &amp;&amp; stars&#91;mid].y == y) return true;\n        if (cmp({x, y}, stars&#91;mid])) right = mid - 1;\n        else left = mid + 1;\n    }\n    return false;\n}\n \nint main() {\n    int n;\n    while (cin &gt;&gt; n) {\n        if (n == 0) break;\n \n        vector&lt;node&gt; stars(n);\n        for (int i = 0; i &lt; n; ++i) {\n            cin &gt;&gt; stars&#91;i].x &gt;&gt; stars&#91;i].y;\n        }\n         \n        sort(stars.begin(), stars.end(), cmp);\n \n        int count = 0;\n \n        for (int i = 0; i &lt; n; ++i) {\n            for (int j = i + 1; j &lt; n; ++j) {\n                int x1 = stars&#91;i].x;\n                int y1 = stars&#91;i].y;\n                int x2 = stars&#91;j].x;\n                int y2 = stars&#91;j].y;\n \n                int x3 = x1 + (y1 - y2);\n                int y3 = y1 - (x1 - x2);\n                int x4 = x2 + (y1 - y2);\n                int y4 = y2 - (x1 - x2);\n \n                if (find(stars, x3, y3) &amp;&amp; find(stars, x4, y4)) {\n                    count++;\n                }\n            }\n        }\n         \n        cout &lt;&lt; count \/ 2 &lt;&lt; \"\\n\";\n    }\n    return 0;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1271\">C008 \u661f\u7403\u7a7f\u68ad<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u53c8\u4e00\u5c4a\u7684\u201c\u7a7f\u68ad\u661f\u7403\u201c\u6bd4\u8d5b\u5f00\u59cb\u4e86\u3002\u8fd9\u9879\u6bd4\u8d5b\u5c06\u5728\u661f\u7403\u6392\u5230\u4e00\u6392\u7684\u8d5b\u9053\u4e0a\u8fdb\u884c\uff0c\u5728\u8d5b\u9053\u4e0a\u7ec4\u59d4\u4f1a\u5df2\u7ecf\u9009\u62e9\u597d\u4e86\u8d77\u70b9\uff08\u8d77\u70b9\u57280\u4f4d\u7f6e\uff09\u548c\u7ec8\u70b9\uff08\u5728L\u4f4d\u7f6e\uff09\u7684\u661f\u7403\uff0c\u5728\u5176\u4e2d\u95f4\u6709N\u4e2a\u661f\u7403\uff0c\u53c2\u8d5b\u9009\u624b\u53ea\u80fd\u4ece\u5f53\u524d\u7684\u661f\u7403\u7a7f\u68ad\u5230\u6700\u8fd1\u7684\u661f\u7403\u3002\u4e3a\u4e86\u63d0\u9ad8\u96be\u5ea6\uff0c\u7ec4\u59d4\u4f1a\u4f1a\u79fb\u53bb\u4e00\u90e8\u5206\u661f\u7403\uff0c\u52a0\u5927\u9009\u624b\u7684\u6700\u5c0f\u7a7f\u68ad\u8ddd\u79bb\u3002\u4f46\u662f\u7531\u4e8e\u7ecf\u8d39\u6709\u9650\uff0c\u7ec4\u59d4\u4f1a\u53ea\u4f1a\u79fb\u53bbM\u4e2a\u661f\u7403\u3002\u73b0\u5728\u9700\u8981\u8ba1\u7b97\u51fa\u5f53\u524d\u9009\u624b\u7684\u6700\u5927\u6700\u5c0f\u7a7f\u68ad\u8ddd\u79bb\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u7b2c\u4e00\u884c\u5305\u62ecL\uff0cN\uff0cM\uff081 &lt;= L &lt;= 1000\uff0c0 &lt;= M &lt;= N &lt;= 1000)\u5206\u522b\u8868\u793a\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u8ddd\u79bb\uff0c\u8d77\u70b9\u4e0e\u7ec8\u70b9\u4e4b\u95f4\u7684\u661f\u7403\u6570\u4ee5\u53ca\u7ec4\u59d4\u4f1a\u79fb\u53bb\u7684\u661f\u7403\u4e2a\u6570\u3002 \u63a5\u4e0b\u6765N\u884c\uff0c\u6bcf\u884c\u4e00\u4e2a\u6574\u6570Di\uff080 &lt; D &lt; L\uff09\u8868\u793a\u8d77\u70b9\u4e0e\u5f53\u524d\u661f\u7403\u7684\u8ddd\u79bb\u3002\u4fdd\u8bc1\u8ddd\u79bb\u4ece\u5c0f\u5230\u5927\u7ed9\u51fa\uff0c\u4e14\u4e0d\u4f1a\u6709\u4e24\u4e2a\u661f\u7403\u51fa\u73b0\u5230\u540c\u4e00\u4f4d\u7f6e\uff0c\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u661f\u7403\u662f\u4e0d\u80fd\u88ab\u79fb\u8d70\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u4e00\u4e2a\u6574\u6570\uff0c\u8868\u793a\u7a7f\u68ad\u8ddd\u79bb\u7684\u6700\u5927\u503c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">25 5 2 <br>2<br>11<br>14<br>17 <br>21<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">4<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u7b14\u8005\u4e00\u5f00\u59cb\u8bfb\u4e86\u534a\u5929\u6ca1\u8bfb\u61c2\u9898\u610f\uff0c\u7136\u540e\u624d\u53cd\u5e94\u8fc7\u6765\u6c42\u7684\u662f\u201c\u6700\u5927\u201c\u7684\u201d\u6700\u5c0f\u7a7f\u68ad\u8ddd\u79bb\u201c\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u5e0c\u671b\u8ba9\u6700\u5c0f\u95f4\u8ddd\u5c3d\u53ef\u80fd\u5927\u3010\u901a\u8fc7\u5220\u9664\u661f\u7403\u3011\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u518d\u4ed4\u7ec6\u4e00\u8bfb\uff0c\u8fd9\u9898\u4e0d\u5c31\u662f\u8df3\u77f3\u5934\u8fd9\u9053\u9898\u6700\u7ecf\u5178\u7684\u4e8c\u5206\u9898\u76ee\u561b\uff01\uff08\u5fc5\u4f1a\uff09<\/p>\n\n\n\n<p>\u90a3\u4e48\u5c31\u76f4\u63a5\u770b\u4ee3\u7801\u5427\uff0c\u4e5f\u5c31\u662f\u4e8c\u5206\u679a\u4e3e\u6700\u5c0f\u8ddd\u79bb\uff0c\u7136\u540e\u5224\u65ad\u8981\u8fbe\u5230\u8fd9\u4e2a\u6700\u77ed\u8ddd\u79bb\uff0c\u9700\u8981\u79fb\u9664\u591a\u5c11\u4e2a\u661f\u7403\uff0c\u5982\u679c\u8981\u79fb\u9664\u7684\u592a\u591a\u5c31\u4e0d\u884c\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h&gt;\nusing namespace std;\nint a&#91;10005];\nint L,n,m;\nint check(int k){\n    int now = 0;\n    int cnt = 0;\n    for(int i = 1;i &lt;= n+1;i++)\n    {\n        if (a&#91;i] - a&#91;now] &lt; k)\n            cnt++;\n        else \n            now = i; \n    }\n    if (cnt &lt;= m)\n        return 1;\n    else \n        return 0;\n}\nint main(){\n    cin &gt;&gt; L &gt;&gt; n &gt;&gt; m;\n    for (int i = 1; i &lt;= n; i++){\n        cin &gt;&gt; a&#91;i];\n    }\n    a&#91;n+1] = L;\n    int ans, l = 0, r = L;\n    while (l &lt;= r){\n        int mid = (l + r) \/ 2;\n        if (check(mid)){\n            ans = mid;\n            l = mid + 1;\n        }\n        else\n            r = mid - 1;\n    }\n    cout &lt;&lt; ans &lt;&lt; \"\\n\";\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"http:\/\/39.101.69.154\/problem.php?id=1589\">C009 \u6392\u5217\u786c\u5e01<\/a><\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h4 class=\"wp-block-heading\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n\n\n\n<p>\u4f60\u603b\u5171\u6709 n\u679a\u786c\u5e01\uff0c\u5e76\u8ba1\u5212\u5c06\u5b83\u4eec\u6309\u9636\u68af\u72b6\u6392\u5217\u3002\u5bf9\u4e8e\u4e00\u4e2a\u7531k\u884c\u7ec4\u6210\u7684\u9636\u68af\uff0c\u5176\u7b2ci\u884c\u5fc5\u987b\u6b63\u597d\u6709i\u679a\u786c\u5e01\u3002\u9636\u68af\u7684\u6700\u540e\u4e00\u884c <strong>\u53ef\u80fd<\/strong> \u662f\u4e0d\u5b8c\u6574\u7684\u3002<\/p>\n\n\n\n<p>\u7ed9\u4f60\u4e00\u4e2a\u6570\u5b57n\uff0c\u8ba1\u7b97\u5e76\u8fd4\u56de\u53ef\u5f62\u6210 <strong>\u5b8c\u6574\u9636\u68af\u884c<\/strong> \u7684\u603b\u884c\u6570\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u5165<\/h4>\n\n\n\n<p>\u8f93\u5165\u7b2c\u4e00\u884c\u4e3a\u6d4b\u8bd5\u6570\u636e\u7684\u7ec4\u6570\uff0c\u63a5\u4e0b\u6765\u7684\u6bcf\u884c\u6709\u4e00\u4e2a\u6574\u6570n\u4ee3\u8868\u786c\u5e01\u7684\u4e2a\u6570\uff0c\u4e141 &lt;= n &lt;= 231 &#8211; 1<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa<\/h4>\n\n\n\n<p>\u6bcf\u884c\u8f93\u5165\u5bf9\u5e94\u4e00\u4e2a\u8f93\u51fa\uff0c\u4e3a\u201c\u5b8c\u6574\u9636\u68af\u884c\u201d\u7684\u6570\u91cf<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u5165 \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">2<br>5<br>8<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6837\u4f8b\u8f93\u51fa \u590d\u5236<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">2<br>3<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u601d\u8def\uff1a<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u9053\u9898\u6211\u4eec\u5c31\u53ef\u4ee5\u6a21\u62df\u4e00\u904d\uff0c\u5c31\u662f\u4ece\u7b2c\u4e00\u5c42\u4e00\u76f4\u52a0\u5230\u6700\u540e\u4e00\u5c42\u3002<\/p>\n\n\n\n<p>\u5f53\u7136\u4e5f\u53ef\u4ee5\u7528\u7b49\u5dee\u6570\u5217\u7684\u516c\u5f0f\u6765\u6c42\uff0c\u7136\u540e\u6c42\u5230\u6bd4n\u8fd8\u5927\u4e4b\u540e\u518d\u51cf1\u5373\u53ef\u3010\u8fd9\u4e2a\u5199\u6cd5\u53ef\u4ee5\u907f\u5f00\u4e00\u4e9b\u95ee\u9898\u3011<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801C++\uff1a<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#include&lt;bits\/stdc++.h>\nusing namespace std;\nvoid solve(){\n \u00a0 \u00a0int n;\n \u00a0 \u00a0cin >> n;\n \u00a0 \u00a0int sum = 0;\n \u00a0 \u00a0int cnt = 0;\n \u00a0 \u00a0int flag = 1;\n \u00a0 \u00a0while(sum &lt;= n){\n \u00a0 \u00a0 \u00a0 \u00a0cnt++;\n \u00a0 \u00a0 \u00a0 \u00a0sum = 0;\n \u00a0 \u00a0 \u00a0 \u00a0sum += (1 + cnt) * cnt \/ 2;\n \u00a0  }\n \u00a0 \u00a0cout &lt;&lt; cnt - 1 &lt;&lt; \"\\n\";\n}\nint main(){\n \u00a0 \u00a0int t;\n \u00a0 \u00a0cin >> t;\n \u00a0 \u00a0while(t--){\n \u00a0 \u00a0 \u00a0 \u00a0solve();\n \u00a0  }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u8fd9\u5957\u9898\u7684\u6838\u5fc3\u5176\u5b9e\u5c31\u662f\u4e8c\u5206~ \u867d\u7136\u6211\u4eec\u53ef\u4ee5\u7528\u4e00\u4e9b\u597d\u7528\u7684\u6570\u636e\u7ed3\u6784\u5077\u5077\u61d2\uff0c\u4f46\u662f\u4e8c\u5206\u8fd8\u662f\u5f97\u4f1a\u7684\uff01 C001 \u5b57\u7b26 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,19,15],"tags":[],"class_list":["post-314","post","type-post","status-publish","format-standard","hentry","category-nenuoj-2","category-19","category-15"],"_links":{"self":[{"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/posts\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":5,"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/posts\/314\/revisions"}],"predecessor-version":[{"id":361,"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/posts\/314\/revisions\/361"}],"wp:attachment":[{"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/media?parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/categories?post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nenuacm.top\/index.php\/wp-json\/wp\/v2\/tags?post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}