{"id":490,"date":"2012-09-30T23:58:50","date_gmt":"2012-09-30T15:58:50","guid":{"rendered":"http:\/\/www.shuizilong.com\/house\/?p=490"},"modified":"2012-10-01T20:47:56","modified_gmt":"2012-10-01T12:47:56","slug":"zoj-monthly-september-2012","status":"publish","type":"post","link":"https:\/\/www.shuizilong.com\/house\/archives\/zoj-monthly-september-2012\/","title":{"rendered":"ZOJ Monthly, September 2012"},"content":{"rendered":"<p><a href=\"https:\/\/www.shuizilong.com\/house\/wp-content\/uploads\/2012\/09\/yowai.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"492\" data-permalink=\"https:\/\/www.shuizilong.com\/house\/archives\/zoj-monthly-september-2012\/yowai\/\" data-orig-file=\"https:\/\/www.shuizilong.com\/house\/wp-content\/uploads\/2012\/09\/yowai.jpg\" data-orig-size=\"214,149\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"yowai\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.shuizilong.com\/house\/wp-content\/uploads\/2012\/09\/yowai.jpg\" data-large-file=\"https:\/\/www.shuizilong.com\/house\/wp-content\/uploads\/2012\/09\/yowai.jpg\" src=\"https:\/\/www.shuizilong.com\/house\/wp-content\/uploads\/2012\/09\/yowai.jpg\" alt=\"\" title=\"yowai\" width=\"214\" height=\"149\" class=\"aligncenter size-full wp-image-492\" \/><\/a><\/p>\n<p>Problem A. Kitty&#8217;s Game<br \/>\n\u6709\u4e00\u53ea\u55b5\u8eab\u4e0a\u6709\u4e2a\u8bb0\u5206\u724c\uff0c\u6bcf\u4e2a\u70b9\u4e0a\u6709\u4e00\u4e2a\u5168\u503c pi\uff0c\u5979\u6bcf\u6cbf\u7740\u8fb9\u8d70\u4e00\u6b65\uff0c\u8bb0\u5206\u724c\u4e0a\u7684\u6570\u5b57\u5c31\u4f1a\u53d8\u4e3a\u8fd9\u4e24\u4e2a\u6570\u5b57\u7684 lcm\u3002<br \/>\n\u95ee\u4ece\u8d77\u70b9S\u8d70\u5230\u7ec8\u70b9T\uff0c\u6700\u540e\u8bb0\u5206\u724c\u4e0a\u6570\u5b57\u4e3a k \u7684\u65b9\u6848\u6709\u591a\u5c11\u79cd\u3002\uff08\u8981\u6c42\u6bcf\u4e00\u6b65\u8bb0\u5206\u724c\u4e0a\u7684\u6570\u5b57\u90fd\u5fc5\u987b\u53d1\u751f\u53d8\u5316\u3002<br \/>\nTags: DP<br \/>\n\u7565\u3002( .. \u6ce8\u610f\u5230 lcm \u5355\u8c03\u9012\u589e\uff0c\u7528\u8fd9\u4e2a\u503c\u5212\u5206\u9636\u6bb5\u5373\u53ef\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711276\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711276<\/a><\/p>\n<p><!--more--><\/p>\n<p>Problem B. BiliBili<br \/>\n\u3002\u7565\u3002\u3002\u7c7b\u4f3c <a href=\"http:\/\/www.lydsy.com\/JudgeOnline\/problem.php?id=1013\">[JSOI2008]\u7403\u5f62\u7a7a\u95f4\u4ea7\u751f\u5668sphere<\/a>\u3002\u3002<br \/>\n\u505a\u5dee\u540e\u6d88\u53bb\u4e8c\u6b21\u9879\uff0c\u8f6c\u6362\u6210\u7ebf\u6027\u65b9\u7a0b\u7ec4\u9ad8\u65af\u6d88\u5143\u5373\u53ef\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=709071\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=709071<\/a><\/p>\n<p>Problem C. Matrix Transformer<br \/>\n\u3002\u3002\u5f00\u59cb\u8ba4\u4e3a\u4efb\u610f\u884c\u6216\u8005\u5217\u90fd\u6709 1 \u5c31\u884c\uff0c\u53cd\u4f8b\u662f 1 \u5168\u90e8\u96c6\u4e2d\u5728\u67d0\u884c\u67d0\u5217\u7684\u60c5\u51b5\u3002\u3002<br \/>\n\u3002\u3002\u3002\uff08\u7136\u540e\u53d1\u73b0\u5176\u5b9e\u5c31\u662f\u6c42\u662f\u5426\u6709\u5b8c\u5907\u5339\u914d\u5427\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=709215\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=709215<\/a><\/p>\n<p>Problem D. Gao the Grid<br \/>\n\u597d\u50cf\u5c31\u662f Codeforces #136 DIV 1 \u7684 Problem D\u3002\u3002(\u3002\u7684\u5f31\u5316\u3002\u3002<br \/>\n<a href=\"http:\/\/codeforces.com\/contest\/220\/problem\/D\">http:\/\/codeforces.com\/contest\/220\/problem\/D<\/a><br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/contest\/viewSource.action?id=711104\">http:\/\/acm.hust.edu.cn:8080\/judge\/contest\/viewSource.action?id=711104<\/a><\/p>\n<p>Problem E. Gao the Grid II<br \/>\n\u53ea\u8ba1\u6570\u9510\u89d2\u4e09\u89d2\u5f62\u3002\u3002\u3002<br \/>\n\u3002\u3002\uff08\u3002\u3002\u5b9e\u9645\u4e0a\u6570\u636e\u5f31\u6210\u72d7\u3002\u3002\u4f7f\u7528\u70b9\u79ef\u7136\u540e O\uff08n4\uff09\u66b4\u529b\u4e5f\u80fd\u8fc7\u3002\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/contest\/viewSource.action?id=711141\">http:\/\/acm.hust.edu.cn:8080\/judge\/contest\/viewSource.action?id=711141<\/a><br \/>\n\uff08\u5514\u3002\u3002\u8fd9\u7c7b\u95ee\u9898\u6709\u5f85\u603b\u7ed3\u3002\u3002\u8981\u4e0d\u6bd4\u8d5b\u65f6\u8fd8\u662f\u8dea\u6210 SB \u554a\u3002\u3002<\/p>\n<p>Problem F. Social Net<br \/>\nSub Task 1: \u6700\u5927\u751f\u6210\u6811\u3002\uff08\u7565\u3002\u3002<br \/>\nSub Task 2: \u7ed9\u5b9a\u4e00\u9897\u70b9\u6743\u6811\uff0c\u6743\u503c\u8bb0\u4e3a ai\uff0c\u6bcf\u6b21\u8be2\u95ee x -> y \u7684\u8def\u5f84\u4e0a\uff0c<br \/>\nmax(aj &#8211; ai), j >= i \u7684\u503c\u662f\u591a\u5c11\u3002\u3002\uff08\u5c06\u8def\u5f84\u5c55\u5f00\u770b\u6210\u94fe\u3002\u3002<br \/>\nTags: \u500d\u589e\u7956\u5148<br \/>\n\u5bf9\u4e8e\u94fe\u4e0a\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u7528 O(n) \u89e3\u51b3\u3002\uff08\u52a8\u6001\u89c4\u5212\u3002\u3002<br \/>\n\u3002\u6811\u4e0a\u7ed3\u6784\u5219\u5148\u7528\u500d\u589e\u7956\u5148\u538b\u7f29\u7ed3\u70b9\u4fe1\u606f\u3002\u3002\u518d\u8dd1\u94fe\u4e0a\u7b97\u6cd5\u5373\u53ef\u3002\u3002<br \/>\n\uff08\u6ce8\u610f\u53e6\u4e00\u6761\u8981\u53d6\u53cd\u5e8f\uff0c\u53e6\u5916 lca \u4f4d\u7f6e\u4e0a\u7684\u5143\u7d20\u548c\u8c10\u8d77\u89c1\u6700\u597d\u4e00\u8fb9\u5404\u53d6\u4e00\u6b21\u3002\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711497\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711497<\/a><\/p>\n<p>Problem G. Toy Blocks<br \/>\n\u5728\u6570\u8f74\u4e0a\u7ed9\u5b9a\u82e5\u5e72\u591a\u7c73\u8bfa\u9aa8\u724c\uff0c\u95ee\u81f3\u5c11\u51e0\u6b21\u53ef\u4ee5\u653e\u5012\u6240\u6709\u9aa8\u724c\u3002<br \/>\nTags: \u52a8\u6001\u89c4\u5212\uff0czkw \u7ebf\u6bb5\u6811<br \/>\n\u7565\uff09\u3002\u3002\u9884\u5904\u7406\u548c DP \u7684\u8fc7\u7a0b\u90fd\u9700\u8981\u4f7f\u7528\u6570\u636e\u7ed3\u6784\u4f18\u5316\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=713189\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=713189<\/a><\/p>\n<p>Problem H. Cipher LockCipher Lock<br \/>\n\u4e00\u4e2a\u73af, \u73af\u4e0a\u6bcf\u4e2a\u70b9\u6709 a, b \u4e24\u4e2a\u5c5e\u6027\u3002\u3002\uff08a <= P, b <= Q..\n\u8981\u6c42\u76f8\u90bb\u4e24\u4e2a\u73af\u81f3\u5c11\u6709\u4e00\u4e2a\u5c5e\u6027\u662f\u76f8\u540c\u7684\u3002\u3002\n\u5176\u4e2d\u4e00\u4e9b\u4f4d\u7f6e\u8981\u6c42\u662f\u7ed9\u5b9a\u7684 ai, bi.. \u95ee\u65b9\u6848\u603b\u6570\u3002\u3002\n\nTags: \u72b6\u6001\u538b\u7f29 DP, \u77e9\u9635\u4e58\u6cd5\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711038\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711038<\/a><\/p>\n<p>\u5148\u6839\u636e\u6bcf\u4e2a\u5df2\u786e\u5b9a\u7684\u4f4d\u7f6e\u62c6\u73af\u3002\uff08\u672c\u9898\u4e2d\u5df2\u786e\u5b9a\u4f4d\u7f6e\u81f3\u5c11\u5b58\u5728\u4e00\u4e2a\u3002\u3002\u3002<br \/>\n\u3002\u3002\u7136\u540e\u66b4\u529b DP \u3002\u3002\u7136\u540e\u53d1\u73b0\u72b6\u6001\u53ea\u4e0e\u662f\u5426\u548c\u8d77\u59cb\u4f4d\u7f6e\u76f8\u540c\u6709\u5173\u3002\u3002<br \/>\n\u3002\u3002\u6709\u4e24\u4e2a\u5c5e\u6027\u538b\u7f29\u540e\u5c31\u662f 2 \u4f4d\u3002\u3002\u3002<br \/>\n\u3002\u3002\u4eba\u5de5\u5236\u51fa\u8f6c\u79fb\u77e9\u9635\u5373\u53ef\u3002\u3002\u3002<\/p>\n<p>Problem I. Maze<br \/>\n\u3002\u3002\u6bd4\u8f83\u88f8\u7684 mask bfs \u3002\u3002\u6ca1\u4ec0\u4e48\u597d\u8bf4\u7684\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=710689\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=710689<\/a><\/p>\n<p>Problem J. Sleeper&#8217;s Schedule<br \/>\n\u7761\u7720\u5206\u914d\u95ee\u9898\u3002\u3002\uff08\u533a\u95f4\u8c03\u5ea6\u95ee\u9898 Power up\uff0c<br \/>\n\u3002\u3002\u4e00\u6b21\u9192\u6765\u540e\u5fc5\u987b\u5728 [t, t+l] \u4e4b\u95f4\u518d\u6b21\u7761\u7720\u3002\u3002<br \/>\n\u3002\u5982\u679c\u5728 t \u5c0f\u65f6\u4e4b\u540e\u7761\u7720\uff0c\u5219\u4f1a\u6709\u76f8\u5e94\u7684\u60e9\u7f5a\u5206\u6570\uff0c\u4e14\u672c\u6b21\u7761\u7720\u7684\u65f6\u95f4\u76f8\u5e94\u5ef6\u957f\u3002\u3002\u3002<br \/>\n\u3002\u3002(\u3002\u3002\u8d8a\u5f80\u540e\u5355\u4f4d\u65f6\u95f4\u7684\u60e9\u7f5a\u8d8a\u9ad8\u3002\u3002\u4e5f\u5c31\u662f\u8d85\u8fc7 t \u7684\u90e8\u5206\u5e73\u65b9\u3002\u3002\u5f88\u79d1\u5b66\u3002\u3002<br \/>\n\u6700\u7ec8\u5f97\u5206\u4e3a [\u533a\u95f4\u8c03\u5ea6\u5f97\u5206] &#8211; [\u71ac\u591c\u60e9\u7f5a]\u3002\u3002<\/p>\n<p>Analysis:<br \/>\n\u3002DP[i][j] \u8868\u793a\u65f6\u523b i \u5df2\u7ecf\u71ac\u4e86 j \u65f6\u95f4\u7684\u6700\u5927\u6536\u76ca\u3002\u3002\u8f6c\u79fb\u5206\u4e09\u79cd\u60c5\u51b5\u8ba8\u8bba\u5373\u53ef\u3002(\u7741\u773c\uff0c\u7761\u89c9\uff0c\u53d6\u533a\u95f4\u3002\u3002<br \/>\n\u6ce8\u610f\u8fb9\u754c\u7b49\u7ec6\u8282\u3002\uff08\u53e6\u5916 dp[] \u4e2d\u95f4\u503c\u6709\u53ef\u80fd\u4ece\u8d1f\u503c\u8f6c\u79fb\uff0c\u521d\u59cb\u5316\u8981\u8bbe\u7f6e\u6210 -oo\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=710322\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=710322<\/a><\/p>\n<p>ZOJ 3654 Letty&#8217;s Math Class<br \/>\n\u3002\u3002\u3002\u9ebb\u70e6\u7684\u5730\u65b9\u4f3c\u4e4e\u53ea\u5728\u9ad8\u7cbe\u5ea6\u8868\u8fbe\u5f0f\u89e3\u6790\u7684\u90a3\u5757\u3002\u3002<br \/>\n\u3002\u3002Python \u7684\u8bdd \u76f4\u63a5 input() \u8fdb\u6765\u5c31\u884c\u4e86\u3002\uff08Ruby \u7684\u5bf9\u5e94\u7684\u5199\u6cd5\u597d\u50cf\u662f eval gets ?\u3002\u3002<br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=709304\">http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=709304<\/a><\/p>\n<h3>External link: <\/h3>\n<p><a href=\"http:\/\/edward-mj.com\/?p=615\">http:\/\/edward-mj.com\/?p=615<\/a><br \/>\n<a href=\"http:\/\/acm.zju.edu.cn\/onlinejudge\/showContestProblems.do?contestId=341\">http:\/\/acm.zju.edu.cn\/onlinejudge\/showContestProblems.do?contestId=341<\/a><br \/>\n<a href=\"http:\/\/acm.hust.edu.cn:8080\/judge\/contest\/view.action?cid=13939#overview\">http:\/\/acm.hust.edu.cn:8080\/judge\/contest\/view.action?cid=13939#overview<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem A. Kitty&#8217;s Game \u6709\u4e00\u53ea\u55b5\u8eab\u4e0a\u6709\u4e2a\u8bb0\u5206\u724c\uff0c\u6bcf\u4e2a\u70b9\u4e0a\u6709\u4e00\u4e2a\u5168\u503c pi\uff0c\u5979\u6bcf\u6cbf\u7740\u8fb9\u8d70\u4e00\u6b65\uff0c\u8bb0\u5206\u724c\u4e0a\u7684\u6570\u5b57\u5c31\u4f1a\u53d8\u4e3a\u8fd9\u4e24\u4e2a\u6570\u5b57\u7684 lcm\u3002 \u95ee\u4ece\u8d77\u70b9S\u8d70\u5230\u7ec8\u70b9T\uff0c\u6700\u540e\u8bb0\u5206\u724c\u4e0a\u6570\u5b57\u4e3a k \u7684\u65b9\u6848\u6709\u591a\u5c11\u79cd\u3002\uff08\u8981\u6c42\u6bcf\u4e00\u6b65\u8bb0\u5206\u724c\u4e0a\u7684\u6570\u5b57\u90fd\u5fc5\u987b\u53d1\u751f\u53d8\u5316\u3002 Tags: DP \u7565\u3002( .. \u6ce8\u610f\u5230 lcm \u5355\u8c03\u9012\u589e\uff0c\u7528\u8fd9\u4e2a\u503c\u5212\u5206\u9636\u6bb5\u5373\u53ef\u3002\u3002 http:\/\/acm.hust.edu.cn:8080\/judge\/problem\/viewSource.action?id=711276<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[15],"tags":[],"class_list":["post-490","post","type-post","status-publish","format-standard","hentry","category-online"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2tdP7-7U","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/posts\/490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/comments?post=490"}],"version-history":[{"count":1,"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/posts\/490\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/posts\/490\/revisions\/493"}],"wp:attachment":[{"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/media?parent=490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/categories?post=490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shuizilong.com\/house\/wp-json\/wp\/v2\/tags?post=490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}