{"id":275,"date":"2024-04-27T11:16:51","date_gmt":"2024-04-27T03:16:51","guid":{"rendered":"https:\/\/seanxd.com\/?p=275"},"modified":"2024-04-27T11:16:53","modified_gmt":"2024-04-27T03:16:53","slug":"zerojudge-b138","status":"publish","type":"post","link":"https:\/\/seanxd.com\/zh\/zerojudge-b138\/","title":{"rendered":"ZeroJudge B138: \u9676\u9676\u6458\u82f9\u679c"},"content":{"rendered":"\n\n\n<p class=\"\">\u9676\u9676\u5bb6\u7684\u9662\u5b50\u88e1\u6709\u4e00\u68f5\u860b\u679c\u6a39\uff0c\u6bcf\u5230\u79cb\u5929\u6a39\u4e0a\u5c31\u6703<strong>\u7d50\u51fa 10 \u500b\u860b\u679c<\/strong>\u3002\u860b\u679c\u6210\u719f\u7684\u6642\u5019\uff0c\u9676\u9676\u5c31\u6703\u8dd1\u53bb\u6458\u860b\u679c\u3002\u9676\u9676\u6709\u500b <strong>30 \u516c\u5206\u9ad8\u7684\u677f\u51f3<\/strong>\uff0c\u7576\u5979\u4e0d\u80fd\u76f4\u63a5\u7528\u624b\u6458\u5230\u860b\u679c\u7684\u6642\u5019\uff0c\u5c31\u6703\u8e29\u5230\u677f\u51f3\u4e0a\u518d\u8a66\u8a66\u3002<\/p>\n\n\n\n<p class=\"\">\u73fe\u5728<strong>\u5df2\u77e5 10 \u500b\u860b\u679c\u5230\u5730\u9762\u7684\u9ad8\u5ea6<\/strong>\uff0c\u4ee5\u53ca\u9676\u9676\u628a<strong>\u624b\u4f38\u76f4\u7684\u6642\u5019\u80fd\u5920\u9054\u5230\u7684\u6700\u5927\u9ad8\u5ea6<\/strong>\uff0c\u8acb\u5e6b\u9676\u9676\u7b97\u4e00\u4e0b\u5979\u80fd\u5920<strong>\u6458\u5230\u7684\u860b\u679c\u7684\u6578\u76ee<\/strong>\u3002\u5047\u8a2d\u5979<strong>\u78b0\u5230\u860b\u679c\uff0c\u860b\u679c\u5c31\u6703\u6389\u4e0b\u4f86<\/strong>\u3002<\/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>\u6bcf\u7d44\u8f38\u5165\u5305\u62ec\u5169\u884c\u8cc7\u6599\u3002<br>\u7b2c\u4e00\u884c\u5305\u542b 10 \u500b 100 \u5230 200 \u4e4b\u9593\u7684\u6574\u6578 (\u4ee5\u516c\u5206\u70ba\u55ae\u4f4d)\uff0c\u5206\u5225\u8868\u793a <strong>10 \u500b\u860b\u679c\u5230\u5730\u9762\u7684\u9ad8\u5ea6<\/strong>\u3002<br>\u7b2c\u4e8c\u884c\u6709\u4e00\u500b 100 \u5230 120 \u4e4b\u9593\u7684\u6574\u6578 (\u4ee5\u516c\u5206\u70ba\u55ae\u4f4d)\uff0c\u8868\u793a\u9676\u9676\u628a\u624b\u4f38\u76f4\u7684\u6642\u5019\u80fd\u5920\u9054\u5230\u7684\u6700\u5927\u9ad8\u5ea6\u3002<\/td><td>\u6bcf\u7d44\u8f38\u51fa\u4e00\u500b\u6574\u6578\uff0c\u8868\u793a\u9676\u9676\u80fd\u5920\u6458\u7684\u860b\u679c\u7684\u6578\u76ee\u3002<\/td><\/tr><tr><td>100 200 150 140 129 134 167 198 200 111<br>110<\/td><td>5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u984c\u601d\u8def<\/h2>\n\n\n\n<p class=\"\">\u56e0\u70ba\u6709\u4e00\u500b 30 \u516c\u5206\u9577\u7684\u51f3\u5b50\uff0c\u6240\u4ee5\u5728<strong>\u8f38\u5165\u860b\u679c\u9ad8\u5ea6\u7684\u6642\u5019\u53ef\u4ee5\u76f4\u63a5 -30 \u516c\u5206<\/strong>\u3002\u4e4b\u5f8c\u518d\u4e00\u500b\u4e00\u500b\u5224\u65b7\u9ad8\u5ea6<strong>\u662f\u5426\u5c0f\u65bc\u7b49\u65bc\u624b\u80fd\u4f38\u5230\u7684\u9ad8\u5ea6<\/strong>\u5373\u53ef\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7bc4\u4f8b\u7a0b\u5f0f\u78bc\uff0d<a href=\"https:\/\/zerojudge.tw\/ShowProblem?problemid=b138\" target=\"_blank\" rel=\"noreferrer noopener\">ZeroJudge B138: \u9676\u9676\u6458\u82f9\u679c<\/a><\/h3>\n\n\n\n<div class=\"hcb_wrap nfd-wb-animate nfd-wb-reveal-right nfd-delay-50\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#include &lt;iostream&gt;\n#include &lt;vector&gt;\nusing namespace std;\n\nint main() {\n    cin.sync_with_stdio(0);\n    cin.tie(0);\n    vector&lt;int&gt;num;\n    for (int i = 0; i&lt;10; i++)\n    {\n        int tmp;\n        cin &gt;&gt; tmp;\n        tmp -= 30;\n        num.push_back(tmp);\n    }\n    int height, ans = 0;\n    cin &gt;&gt; height;\n    for (int i = 0; i&lt;10; i++)\n    {\n        if (height &gt;= num[i]) ans++;\n    }\n    cout &lt;&lt; ans &lt;&lt; &quot;\\n&quot;;\n}\n\n\/\/ZeroJudge B138\n\/\/Dr. SeanXD<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u9676\u9676\u5bb6\u7684\u9662\u5b50\u88e1\u6709\u4e00\u68f5\u860b\u679c\u6a39\uff0c\u6bcf\u5230\u79cb\u5929\u6a39\u4e0a\u5c31\u6703\u7d50\u51fa 10 \u500b\u860b\u679c\u3002\u860b\u679c\u6210\u719f\u7684\u6642\u5019\uff0c\u9676\u9676\u5c31\u6703\u8dd1\u53bb\u6458\u860b\u679c\u3002\u9676\u9676\u6709\u500b  [&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":[25],"tags":[20,8,13,9],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-ioi-apcs","tag-20","tag-8","tag-13","tag-9"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/275","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=275"}],"version-history":[{"count":2,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":277,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/275\/revisions\/277"}],"wp:attachment":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}