{"id":139,"date":"2026-10-11T19:15:53","date_gmt":"2026-10-11T11:15:53","guid":{"rendered":"http:\/\/bkxiaohei123.xyz\/?p=139"},"modified":"2026-10-11T19:16:42","modified_gmt":"2026-10-11T11:16:42","slug":"%e6%97%a5%e5%b8%b8%e5%86%99%e9%a2%98%ef%bc%9acf1742f-smaller","status":"publish","type":"post","link":"https:\/\/bkxiaohei123.xyz\/index.php\/2026\/10\/11\/%e6%97%a5%e5%b8%b8%e5%86%99%e9%a2%98%ef%bc%9acf1742f-smaller\/","title":{"rendered":"\u65e5\u5e38\u5199\u9898\uff1aCF1742F Smaller"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.luogu.com.cn\/problem\/CF1742F\">\u9898\u76ee\u94fe\u63a5<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9898\u610f\u5df2\u7ecf\u5f88\u6e05\u695a\u4e86\u5c31\u4e0d\u8bf4\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u9898\u6709\u4e00\u4e2a\u5173\u952e\u6761\u4ef6\u53ef\u4ee5\u6ce8\u610f\uff1a\u53ef\u4ee5\u91cd\u65b0\u6392\u5217 <em>s<\/em> \u548c <em>t<\/em> \u7684\u5b57\u7b26\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6839\u636e\u8fd9\u4e2a\u6761\u4ef6\u4ee5\u53cas\u548ct\u521d\u59cb\u90fd\u4e3a\u2018a\u2019\u53ef\u77e5\uff0c\u5982\u679c\u5e0c\u671bs\u7684\u5b57\u5178\u5e8f\u4e25\u683c\u5c0f\u4e8et\uff0c\u90a3\u4e48\u53ea\u9700\u8981\u8ba9s\u7684\u9996\u5b57\u6bcd\u4e3a\u2018a\u2019\uff0ct\u9996\u5b57\u6bcd\u4e3a\u9664\u2018a\u2019\u4ee5\u5916\u7684\u5176\u4ed6\u5b57\u6cd5\u4fbf\u53ef\uff0c\u56e0\u4e3a\u2018a\u2019\u5728\u5b57\u5178\u5e8f\u4e2d\u6700\u5c0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u6b21\u8fdb\u884c\u64cd\u4f5c\u65f6\u67e5\u770bt\u4e2d\u662f\u5426\u542b\u6709\u9664\u2018a\u2019\u4ee5\u5916\u7684\u5176\u4ed6\u5b57\u7b26\uff0c\u82e5\u542b\u6709\u76f4\u63a5\u8f93\u51fa YES\uff0c\u82e5\u4e0d\u542b\u6709\u5219\u8003\u8651\u4e00\u4e0b\u60c5\u51b5\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">s\u4e2d\u542b\u6709\u5176\u4ed6\u5b57\u7b26\uff1a\u8fd9\u79cd\u60c5\u51b5\u4e0bt\u4e2d\u5168\u662f\u2018a\u2019\uff0c\u4e0d\u53ef\u80fd\u4e25\u683c\u5927\u4e8es \u8f93\u51faNO<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">s\u548ct\u90fd\u4e0d\u542b\u6709\u5176\u4ed6\u5b57\u7b26\uff1a\u5224\u65ad\u957f\u5ea6\u5373\u53ef\uff0c\u82e5t\u7684\u957f\u5ea6\u4e0d\u5c0f\u4e8e\u7b49\u4e8es\uff0c\u8f93\u51faYES\uff0c\u5426\u5219\u8f93\u51faNO<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u9898\u89e3<\/p>\n\n\n\n<pre class=\"wp-block-code language-cpp\" data-wzcbh-download=\"snippet.cpp\"><code lang=\"cpp\" class=\"language-cpp\">#include&lt;bits\/stdc++.h>\nusing namespace std;\n#define int long long\nstring s = \"a\";\nstring t = \"a\";\nbool isa(string arr)\n{\n\tfor (int i = 0; i &lt; arr.size(); i++)\n\t{\n\t\tif (arr[i] != 'a')\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\nvoid resolve()\n{\n\ts = \"a\";\n\tt = \"a\";\n\tint q;\n\tcin >> q;\n\tbool sa = 1;\n\tbool ta = 1;\n\tint scnt = 1, tcnt = 1;\n\twhile (q--)\n\t{\n\t\tint a, b;\n\t\tstring c;\n\t\tcin >> a >> b >> c;\t\t\n\t\tbool flag = isa(c);\n\t\tif (sa &amp;&amp; ta &amp;&amp; flag)\n\t\t{\n\t\t\tif (a == 1)\n\t\t\t\tscnt += b * (int)c.size();\n\t\t\telse\n\t\t\t\ttcnt += b * (int)c.size();\n\t\t\tif (tcnt &lt;= scnt)\n\t\t\t\tcout &lt;&lt; \"NO\" &lt;&lt; endl;\n\t\t\telse\n\t\t\t\tcout &lt;&lt; \"YES\" &lt;&lt; endl;\n\t\t\tcontinue;\n\t\t}\t\n\t\tif (!flag)\n\t\t{\n\t\t\tif (a == 1)\n\t\t\t\tsa = 0;\n\t\t\telse\n\t\t\t\tta = 0;\n\t\t}\n\t\tif (!ta)\n\t\t{\n\t\t\tcout &lt;&lt; \"YES\" &lt;&lt; endl;\n\t\t\tcontinue;\n\t\t}\t\n\t\t\tcout &lt;&lt; \"NO\" &lt;&lt; endl;\n\t}\n}\nsigned main() {\n\tios::sync_with_stdio(false);\n\tcin.tie(nullptr);\n\tint T;\n\tcin >> T;\n\twhile (T--)\n\t\tresolve();\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u76ee\u94fe\u63a5 \u9898\u610f\u5df2\u7ecf\u5f88\u6e05\u695a\u4e86\u5c31\u4e0d\u8bf4\u4e86\u3002 \u672c\u9898\u6709\u4e00\u4e2a\u5173\u952e\u6761\u4ef6\u53ef\u4ee5\u6ce8\u610f\uff1a\u53ef\u4ee5\u91cd\u65b0\u6392\u5217 s \u548c t \u7684\u5b57\u7b26\u3002 \u6839\u636e\u8fd9\u4e2a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":91,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14,13,25],"class_list":["post-139","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learning","tag-c","tag-13","tag-25"],"_links":{"self":[{"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":1,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions\/140"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/media\/91"}],"wp:attachment":[{"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bkxiaohei123.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}