{"id":331,"date":"2024-04-27T23:48:09","date_gmt":"2024-04-27T15:48:09","guid":{"rendered":"https:\/\/seanxd.com\/?p=331"},"modified":"2024-04-27T23:48:11","modified_gmt":"2024-04-27T15:48:11","slug":"zerojudge-e578","status":"publish","type":"post","link":"https:\/\/seanxd.com\/en\/zerojudge-e578\/","title":{"rendered":"ZeroJudge E578: Decode the Mad Man"},"content":{"rendered":"\n\n\n<h4 class=\"wp-block-heading\">\u540c\u984c\uff1aUVa 10222 &#8211; Decode the Mad man<\/h4>\n\n\n\n<p class=\"\">BUET\u5927\u5b78\u6709\u4e00\u4f4d\u8001\u6559\u6388\u5c31\u767c\u760b\u4e86\u3002\u4ed6\u958b\u59cb\u8aaa\u4e00\u4e9b\u5947\u602a\u7684\u8a71\u3002\u6c92\u6709\u4eba\u80fd\u5920\u807d\u5f97\u61c2\u4ed6\u7684\u4e0a\u8ab2\u5167\u5bb9\u3002<br>\u6700\u7d42\uff0cBUET\u5927\u5b78\u9677\u5165\u4e86\u96e3\u984c\u3002\u7121\u6cd5\u8b93\u9019\u4f4d\u8001\u6559\u6388\u7e7c\u7e8c\u5728\u5927\u5b78\u6559\u66f8\u3002<br>\u7a81\u7136\u6709\u4e00\u4f4d\u5b78\u751f(\u80af\u5b9a\u662f UVA ACM \u7ae0\u7bc0\u7684\u8a3b\u518a\u4f5c\u8005\uff0c\u4e26\u4e14\u5728 online judge \u6392\u540d\u5f88\u9ad8) \u5275\u9020\u4e86\u4e00\u500b\u53ef\u4ee5\u5c07\u6559\u6388\u8aaa\u7684\u8a71\u89e3\u78bc\u7684\u7a0b\u5f0f\u3002<br>\u5728\u6b64\u4e4b\u5f8c\uff0c\u8001\u6559\u6388\u53c8\u7e7c\u7e8c\u6b63\u5e38\u7684\u6559\u66f8\uff0c\u6bcf\u500b\u4eba\u90fd\u611f\u5230\u5f88\u958b\u5fc3\u3002<br>\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u6709\u6a5f\u6703\u53c3\u8a2aBUET\u5927\u5b78\uff0c\u4e26\u4e14\u770b\u5230\u4e00\u4f4d\u8001\u5e2b\u6b63\u5728\u7528\u88dd\u6709\u8a9e\u97f3\u8fa8\u8b58\u9ea5\u514b\u98a8\u8b1b\u8a71\uff0c\u4f60\u53ef\u5225\u5687\u5230\u3002<br>\u56e0\u70ba\u73fe\u5728\u4f60\u7684\u5de5\u4f5c\u5c31\u662f\u5beb\u76f8\u540c\u7684\u7a0b\u5f0f\u4f86\u89e3\u78bc\u760b\u72c2\u8001\u6559\u6388\u7684\u8a9e\u8a00\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><strong>EOF<\/strong> \u8f38\u5165\uff0c\u50c5\u5305\u542b\u4e00\u7b46\u6e2c\u8a66\u8cc7\u6599\uff0c\u4e5f\u5c31\u662f\u7de8\u78bc\u5f8c\u7684\u8a0a\u606f\u3002<br>\u9019\u7b46\u6e2c\u8a66\u8cc7\u6599\u5305\u542b\u4e00\u500b\u6216\u591a\u500b\u55ae\u5b57\u3002<br><strong>\u5b57\u6bcd\u7686\u70ba\u5c0f\u5beb<\/strong>\u3002<\/td><td>\u6839\u64da\u6e2c\u8a66\u8cc7\u6599\uff0c\u8f38\u51fa\u89e3\u78bc\u5f8c\u7684\u55ae\u5b57\u3002<br>\u9084\u597d\uff0c\u9019\u5de5\u4f5c\u4e26\u4e0d\u96e3\uff0c\u53ea\u8981\u628a\u6bcf\u500b\u5b57\u6bcd\u6216\u7b26\u865f\u4ee5\u9375\u76e4\u4e0a\u5b83\u5de6\u908a\u7b2c\u4e8c\u500b\u9375\u7684\u7b26\u865f\u4f86\u53d6\u4ee3\u5c31\u884c\u4e86\u3002<br>\u4e0d\u6703\u6709\u4e0d\u5408\u7406\u7684\u60c5\u6cc1\uff0c\u6bd4\u65b9\u8aaa\u7de8\u78bc\u8a0a\u606f\u70ba a\uff0c\u4f46\u662f a \u5728\u9375\u76e4\u4e0a\u6c92\u6709\u5de6\u908a\u3002<br>\u7a7a\u767d\u548c\u63db\u884c\u8acb\u76f4\u63a5\u8f38\u51fa\u3002<\/td><\/tr><tr><td>k[r dyt i[o<br>p &#8216;[nt ]y[jyd.<\/td><td>how are you<br>i love program<\/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=\"\">\u4f7f\u7528Map\u4f86\u7d00\u9304\u6bcf\u4e00\u500b\u5b57\u5143\u7684\u5c0d\u61c9\u503c\u3002\u55ae\u5f15\u865f\u662f\u7528 \u300c\\&#8217;\u300d\u4f86\u8868\u793a\uff0c\u53cd\u659c\u7dda\u5247\u662f\u300c\\\u300d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7bc4\u4f8b\u7a0b\u5f0f\u78bc\uff0d<a href=\"https:\/\/zerojudge.tw\/ShowProblem?problemid=e578\" target=\"_blank\" rel=\"noreferrer noopener\">ZeroJudge E578: Decode the Mad Man<\/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;map&gt;\nusing namespace std;\n\nint main() {\n    string str;\n    map&lt;char, char&gt;MAP;\n    MAP[&#39;2&#39;] = &#39;`&#39;;\n    MAP[&#39;3&#39;] = &#39;1&#39;;\n    MAP[&#39;4&#39;] = &#39;2&#39;;\n    MAP[&#39;5&#39;] = &#39;3&#39;;\n    MAP[&#39;6&#39;] = &#39;4&#39;;\n    MAP[&#39;7&#39;] = &#39;5&#39;;\n    MAP[&#39;8&#39;] = &#39;6&#39;;\n    MAP[&#39;9&#39;] = &#39;7&#39;;\n    MAP[&#39;0&#39;] = &#39;8&#39;;\n    MAP[&#39;-&#39;] = &#39;9&#39;;\n    MAP[&#39;=&#39;] = &#39;0&#39;;\n    MAP[&#39;e&#39;] = &#39;q&#39;;\n    MAP[&#39;r&#39;] = &#39;w&#39;;\n    MAP[&#39;t&#39;] = &#39;e&#39;;\n    MAP[&#39;y&#39;] = &#39;r&#39;;\n    MAP[&#39;u&#39;] = &#39;t&#39;;\n    MAP[&#39;i&#39;] = &#39;y&#39;;\n    MAP[&#39;o&#39;] = &#39;u&#39;;\n    MAP[&#39;p&#39;] = &#39;i&#39;;\n    MAP[&#39;[&#39;] = &#39;o&#39;;\n    MAP[&#39;]&#39;] = &#39;p&#39;;\n    MAP[&#39;\\\\&#39;] = &#39;[&#39;;\n    MAP[&#39;d&#39;] = &#39;a&#39;;\n    MAP[&#39;f&#39;] = &#39;s&#39;;\n    MAP[&#39;g&#39;] = &#39;d&#39;;\n    MAP[&#39;h&#39;] = &#39;f&#39;;\n    MAP[&#39;j&#39;] = &#39;g&#39;;\n    MAP[&#39;k&#39;] = &#39;h&#39;;\n    MAP[&#39;l&#39;] = &#39;j&#39;;\n    MAP[&#39;;&#39;] = &#39;k&#39;;\n    MAP[&#39;\\&#39;&#39;] = &#39;l&#39;;\n    MAP[&#39;c&#39;] = &#39;z&#39;;\n    MAP[&#39;v&#39;] = &#39;x&#39;;\n    MAP[&#39;b&#39;] = &#39;c&#39;;\n    MAP[&#39;n&#39;] = &#39;v&#39;;\n    MAP[&#39;m&#39;] = &#39;b&#39;;\n    MAP[&#39;,&#39;] = &#39;n&#39;;\n    MAP[&#39;.&#39;] = &#39;m&#39;;\n    MAP[&#39;\/&#39;] = &#39;,&#39;;\n    MAP[&#39; &#39;] = &#39; &#39;;\n    while (getline(cin, str))\n    {\n        for (int i = 0; i&lt;str.length(); i++)\n        {\n            cout &lt;&lt; MAP[str[i]];\n        }\n        cout &lt;&lt; &quot;\\n&quot;;\n    }\n}\n\n\/\/ZeroJudge E578\n\/\/Dr. SeanXD<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u540c\u984c\uff1aUVa 10222 &#8211; Decode the Mad man BUET\u5927\u5b78\u6709\u4e00\u4f4d\u8001\u6559\u6388\u5c31\u767c\u760b [&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":[18],"tags":[14,11,9],"class_list":["post-331","post","type-post","status-publish","format-standard","hentry","category-uva","tag-map","tag-11","tag-9"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/comments?post=331"}],"version-history":[{"count":1,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":332,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/posts\/331\/revisions\/332"}],"wp:attachment":[{"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/media?parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/categories?post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanxd.com\/en\/wp-json\/wp\/v2\/tags?post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}