{"id":324,"date":"2024-04-27T23:15:07","date_gmt":"2024-04-27T15:15:07","guid":{"rendered":"https:\/\/seanxd.com\/?p=324"},"modified":"2024-04-27T23:15:09","modified_gmt":"2024-04-27T15:15:09","slug":"zerojudge-e925","status":"publish","type":"post","link":"https:\/\/seanxd.com\/zh\/zerojudge-e925\/","title":{"rendered":"ZeroJudge E925: \u5b78\u865f\u6aa2\u67e5"},"content":{"rendered":"\n\n\n<p class=\"\">\u5927\u5b78\u7684\u5b78\u865f\u6709\u4e5d\u78bc\u3002<\/p>\n\n\n\n<p class=\"\">\u7b2c\u4e00\u78bc\u662f\u5b78\u751f\u8eab\u5206 (\u5b78\u58eb\u73ed\u4e00\u822c\u751f\u7684\u4ee3\u865f\u662f\u300cB\u300d\uff09\u3002\u7b2c\u4e8c\u3001\u4e09\u78bc\u662f\u5165\u5b78\u7684\u5b78\u5e74\u5ea6\u6700\u5f8c\u5169\u4f4d\u6578\u3002\u7b2c\u56db\u3001\u4e94\u3001\u516d\u3001\u4e03\u78bc\u662f\u9662\u3001\u7cfb\u3001\u7d44\u4ee3\u865f\u3002\u7b2c\u516b\u3001\u4e5d\u78bc\u662f\u5b78\u751f\u6d41\u6c34\u865f\u3002<br><br>\u672c\u984c\u5047\u8a2d\u5927\u5b78\u6c38\u9060\u6709\u4e0b\u5217\u9662\u3001\u7cfb\u3001\u7d44 (\u6240\u6709\u9662\u3001\u7cfb\u3001\u7d44\u4ee3\u865f\u8acb\u53c3\u8003\u7bc4\u4f8b\u8f38\u5165\uff09\uff1a<br>&#8211; 1000 \u6587\u5b78\u9662<br>&#8211; 2000 \u7406\u5b78\u9662<br>&#8211; 3000 \u793e\u6703\u79d1\u5b78\u9662<br>&#8211; \u4ee5\u4e0b\u7701\u7565&#8230;<\/p>\n\n\n\n<p class=\"\">\u672c\u984c\u5047\u8a2d\u6bcf\u500b\u7d44\u90fd\u53ef\u4ee5\u6536 100 \u500b\u5b78\u751f (\u7b2c\u516b\u3001\u4e5d\u78bc \u300c00\u300d\uff5e\u300c99\u300d\uff09\u3002<\/p>\n\n\n\n<p class=\"\"><br>\u73fe\u5728\u5f9e\u4e00\u5806\u5927\u5b78\u5b78\u865f\u4e2d\u96a8\u6a5f\u62bd\u51fa\u5341\u500b\u5b78\u865f\uff0c\u8acb\u64b0\u5beb\u4e00\u500b\u7a0b\u5f0f\uff0c<br>\u9a57\u8b49\u9019\u5341\u500b\u5b78\u865f\u662f\u5426\u662f\u5408\u6cd5\u7684\u5b78\u865f\uff0c\u4ee5\u53ca\u932f\u8aa4\u6bd4\u4f8b\u3002<br>\u8209\u4f8b\u4f86\u8aaa\uff0c\u5c0d\u65bc\u4ee5\u4e0b\u5341\u500b\u5b78\u865f\uff1a<\/p>\n\n\n\n<p class=\"\">B00100000<br>R00100000 \/\/ \u4e0d\u7b26\u5408\u5b78\u58eb\u73ed\u7684\u5b78\u865f<br>BA0100000 \/\/ \u4e0d\u7b26\u5408\u5165\u5b78\u5e74\u7684\u5b78\u865f<br>B00101300 \/\/ \u4e0d\u7b26\u5408\u7cfb\u7d44\u4ee3\u865f\u7684\u5b78\u865f<br>B001000A0 \/\/ \u4e0d\u7b26\u5408\u6d41\u6c34\u865f\u7684\u5b78\u865f<br>B09902005<br>B06A01233<br>B12701256<br>B80310020<br>B98901030<\/p>\n\n\n\n<p class=\"\">\u7d50\u679c\u70ba Y, N, N, N, N, Y, Y, Y, Y, Y<br>\u932f\u8aa4\u6bd4\u4f8b\u5247\u70ba 0.4<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7bc4\u4f8b\u6e2c\u8cc7<\/h2>\n\n\n\n<figure class=\"wp-block-table nfd-wb-animate nfd-wb-fade-in-bottom-short\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7bc4\u4f8b\u8f38\u5165<\/th><th>\u7bc4\u4f8b\u8f38\u51fa<\/th><\/tr><\/thead><tbody><tr><td>\u8f38\u5165\u7b2c\u4e00\u884c\u6709\u4e00\u500b\u6b63\u6574\u6578 N\uff081 \u2264 N \u2264 76\uff09\uff0c<br>\u4ee3\u8868\u5171\u6709 N \u500b\u9662\u3001\u7cfb\u3001\u7d44\u3002<br>\u63a5\u4e0b\u4f86\u5171\u6709 N \u884c\u6587\u5b57\uff0c<br>\u6bcf\u884c\u6587\u5b57\u7686\u7531\u56db\u500b\u5b57\u5143\u6240\u69cb\u6210\uff0c\u4ee3\u8868\u9662\u3001\u7cfb\u3001\u7d44\u4ee3\u865f\u3002<br>\u6700\u5f8c\u5171\u6709 10 \u884c\u6587\u5b57\uff0c<br>\u6bcf\u884c\u7686\u7531\u4e5d\u500b\u5b57\u5143\u69cb\u6210\uff0c\u4ee3\u8868\u6b32\u9a57\u8b49\u7684\u5b78\u865f\u3002<\/td><td>\u82e5\u9a57\u8b49\u6210\u529f\u8f38\u51fa\u300cY\u300d\uff0c\u82e5\u9a57\u8b49\u5931\u6557\u8f38\u51fa\u300cN\u300d<br>\u6700\u5f8c\u5247\u8f38\u51fa\u9a57\u8b49\u5931\u6557\u7684\u6bd4\u4f8b<\/td><\/tr><tr><td>76<br>0000<br>1000<br>1010<br>1011<br>1020<br>1030<br>1040<br>1050<br>1060<br>1070<br>1090<br>2000<br>2010<br>2020<br>2030<br>2040<br>2070<br>2080<br>2090<br>3000<br>3021<br>3022<br>3023<br>3030<br>3050<br>3100<br>4000<br>4010<br>4020<br>4030<br>4031<br>4040<br>4060<br>4080<br>4081<br>4090<br>4120<br>5000<br>5010<br>5020<br>5040<br>5050<br>5070<br>5080<br>6000<br>6010<br>6020<br>6030<br>6050<br>6060<br>6070<br>6080<br>6090<br>6100<br>6110<br>6120<br>6130<br>7000<br>7011<br>7012<br>7020<br>7030<br>7040<br>7050<br>8000<br>8010<br>9000<br>9010<br>9020<br>A000<br>A011<br>A012<br>A013<br>B000<br>B010<br>B020<br>B00100000<br>R00100000<br>BA0100000<br>B00101300<br>B001000A0<br>B09902005<br>B06A01233<br>B12701256<br>B80310020<br>B98901030<\/td><td>Y<br>N<br>N<br>N<br>N<br>Y<br>Y<br>Y<br>Y<br>Y<br>0.4<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">ZeroJudge E925 \u7bc4\u4f8b\u6e2c\u8cc7<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u984c\u601d\u8def<\/h2>\n\n\n\n<p class=\"\">\u53ef\u4ee5<strong>\u4f7f\u7528 Map \u4f86\u5224\u65b7\u4e2d\u9593\u56db\u500b\u5b57\u5143\u662f\u5426\u6709\u51fa\u73fe\u904e<\/strong>\uff0c\u8f38\u51fa\u5931\u6557\u7387\u6642\u5982\u679c\u6c92\u6709\u9a57\u8b49\u5931\u6557<strong>\u8981\u8f38\u51fa0\u800c\u4e0d\u662f 0.0<\/strong>\uff0c\u5982\u679c<strong>\u5168\u90e8\u90fd\u5931\u6557\u8981\u8f38\u51fa 1 \u800c\u4e0d\u662f 0.10 \u6216 1.0<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7bc4\u4f8b\u7a0b\u5f0f\u78bc\uff0d<a href=\"https:\/\/zerojudge.tw\/ShowProblem?problemid=e925\" target=\"_blank\" rel=\"noreferrer noopener\">ZeroJudge E925: \u5b78\u865f\u6aa2\u67e5<\/a><\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>#include &lt;iostream&gt;\n#include &lt;map&gt;\n#include &lt;cctype&gt;\nusing namespace std;\n\nint main() {\n    int N;\n    cin &gt;&gt; N;\n    map&lt;string, int&gt;MAP;\n    for (int i = 0; i&lt;N; i++)\n    {\n        string str;\n        cin &gt;&gt; str;\n        MAP[str]++;\n    }\n    int wrong = 0;\n    for (int i = 0; i&lt;10; i++)\n    {\n        string str;\n        cin &gt;&gt; str;\n        if (str[0] != &#39;B&#39;)\n        {\n            wrong++;\n            cout &lt;&lt; &quot;N\\n&quot;;\n            continue;\n        }\n        if (!isdigit(str[1]) || !isdigit(str[2]))\n        {\n            wrong++;\n            cout &lt;&lt; &quot;N\\n&quot;;\n            continue;\n        }\n        string tmp = &quot;&quot;;\n        for (int j = 3; j&lt;=6; j++)\n        {\n            tmp += str[j];\n        }\n        if (MAP[tmp] == 0)\n        {\n            wrong++;\n            cout &lt;&lt; &quot;N\\n&quot;;\n            continue;\n        }\n        if (!isdigit(str[7]) || !isdigit(str[8]))\n        {\n            wrong++;\n            cout &lt;&lt; &quot;N\\n&quot;;\n            continue;\n        }\n        cout &lt;&lt; &quot;Y\\n&quot;;\n    }\n    if (wrong == 0) cout &lt;&lt; 0 &lt;&lt; &quot;\\n&quot;;\n    else if (wrong == 10) cout &lt;&lt; 1 &lt;&lt; &quot;\\n&quot;;\n    else cout &lt;&lt; &quot;0.&quot; &lt;&lt; wrong &lt;&lt; &quot;\\n&quot;;\n}\n\n\/\/ZeroJudge E925\n\/\/Dr. SeanXD<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5b78\u7684\u5b78\u865f\u6709\u4e5d\u78bc\u3002 \u7b2c\u4e00\u78bc\u662f\u5b78\u751f\u8eab\u5206 (\u5b78\u58eb\u73ed\u4e00\u822c\u751f\u7684\u4ee3\u865f\u662f\u300cB\u300d\uff09\u3002\u7b2c\u4e8c\u3001\u4e09\u78bc\u662f\u5165\u5b78\u7684\u5b78\u5e74\u5ea6\u6700\u5f8c\u5169\u4f4d\u6578\u3002\u7b2c\u56db [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[29],"tags":[14,8,11,9],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-zerojudge-","tag-map","tag-8","tag-11","tag-9"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":2,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/324\/revisions\/326"}],"wp:attachment":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}