{"id":4437,"date":"2023-04-10T00:45:15","date_gmt":"2023-04-09T15:45:15","guid":{"rendered":"https:\/\/k.foolslab.net\/dailyreport\/?p=4437"},"modified":"2023-04-10T00:46:05","modified_gmt":"2023-04-09T15:46:05","slug":"2023-4-9","status":"publish","type":"post","link":"https:\/\/k.foolslab.net\/dailyreport\/2023-4-9\/","title":{"rendered":"2023\/4\/9(\u65e5)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u7af6\u30d7\u30ed\u3067\u30c6\u30b9\u30c8\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6574\u5099\u3057\u305f\u3002vscode\u3067\u30b3\u30de\u30f3\u30c91\u3064\u3067\u611a\u76f4\u89e3\u3068\u306e\u6bd4\u8f03\u3092\u5b9f\u884c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/Kiterai\/compro-template\">https:\/\/github.com\/Kiterai\/compro-template<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u521d\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092main.cpp\u3068test.cpp\u306b\u5206\u3051\u308b\u3064\u3082\u308a\u3067\u306f\u306a\u304f\u3001\u826f\u3044\u611f\u3058\u306b\u5165\u529b\u3092\u53d7\u3051\u53d6\u308b\u90e8\u5206\u3092\u30e9\u30a4\u30d6\u30e9\u30ea\u5316\u3057\u3066\u30d5\u30e9\u30b0\u6b21\u7b2c\u3067\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3059\u308b\u611f\u3058\u306b\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u3044\u305f\u304c\u3001cin\/cout\u3067\u5165\u51fa\u529b\u3059\u308b\u3060\u3051\u306e\u7d20\u6734\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u306e\u3092\u3084\u3081\u308b\u306e\u306f\u3042\u307e\u308a\u306b\u3082\u8010\u3048\u304c\u305f\u3044\u3068\u3044\u3046\u7d50\u8ad6\u306b\u306a\u3063\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3053\u3067\u3001cout\/cin\u306e\u5165\u51fa\u529b\u5148\u3092\u5909\u66f4\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u306b\u66f8\u304d\u51fa\u3057\u7d50\u679c\u3092\u898b\u308b\u65b9\u7b56\u3092\u601d\u3044\u3064\u3044\u305f\u3002\u3053\u308c\u3067cout\/cin\u3092\u4f7f\u3046\u7d20\u6734\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u63db\u3048\u305a\u306b\u6d41\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u3055\u3089\u306btest.cpp\u306b\u5206\u3051\u3066vscode\u306e\u30bf\u30b9\u30af\u3067\u5225\u6271\u3044\u306b\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u30c6\u30b9\u30c8\u3068\u672c\u5b9f\u884c\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e0a\u3067\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u3059\u3089\u306a\u304f\u306a\u3063\u305f\u3002\u30c6\u30b9\u30c8\u3057\u305f\u304f\u306a\u308c\u3070test.cpp\u306b\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u3070\u3044\u3044\u3057\u3001\u30c6\u30b9\u30c8\u304c\u7d42\u308f\u3063\u305f\u3089main.cpp\u306e\u30b3\u30fc\u30c9\u3092\u63d0\u51fa\u3059\u308c\u3070\u3088\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u65e5\u306eABC\u3067\u306f\u51fa\u756a\u304c\u306a\u304b\u3063\u305f\u304c\u3001\u4eca\u5f8cARC\u306e\u96e3\u3057\u3044\u554f\u984c\u3068\u304b\u3067\u5fc5\u8981\u306b\u8feb\u3089\u308c\u305f\u3068\u304d\u306b\u30b9\u30c3\u3068\u51fa\u305b\u308b\u306e\u306f\u7d76\u5bfe\u306b\u30a2\u30c9\u306b\u306a\u308b\u306f\u305a\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">ABC297\u306b\u51fa\u305f\u3002\u521d\u6a59\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\uff01Highest\u66f4\u65b0\uff01\u52dd\u3061\u307e\u304f\u308a\u30e2\u30c6\u307e\u304f\u308a\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A: n-1\u304b\u6240\u306e\u96a3\u63a5\u90e8\u3092\u78ba\u8a8d\u3059\u308c\u3070\u3088\u3044\u3002\u3053\u3093\u306a\u554f\u984c\u591a\u304f\u306a\u3044\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B: \u4e01\u5be7\u306b\u5b9f\u88c5\u3059\u308b\u3060\u3051\u3002\u3084\u3084\u3081\u3093\u3069\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C: \u5165\u308c\u3089\u308c\u308b\u3068\u3053\u308d\u3078\u8caa\u6b32\u306b\u7aef\u304b\u3089\u5165\u308c\u3066\u554f\u984c\u306a\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">D: \u4e00\u822c\u6027\u3092\u5931\u308f\u305aA&lt;B\u3068\u3059\u308b\u3002$\\lceil(B-A)\/A\\rceil$\u56deA\u3092B\u304b\u3089\u5f15\u304f\u3053\u3068\u304c\u51fa\u6765\u308b\u306e\u3067\u5f15\u304f\u3002\u3053\u308c\u3092\u7e70\u308a\u8fd4\u3059\u3060\u3051\u3067\u3088\u3044\u3002\u8a08\u7b97\u91cf\u89e3\u6790\u3068\u3057\u3066\u306f\u3001\u4e00\u56de\u3053\u308c\u3092\u3084\u308b\u305f\u3073\u306bB\u304c\u534a\u5206\u4ee5\u4e0b\u306b\u306a\u308b\u3053\u3068\u304c\u8a3c\u660e\u3067\u304d\u308b\u306e\u3067$O(\\log \\max(A,B))$\u3067\u89e3\u3051\u308b\u3053\u3068\u304c\u5206\u304b\u308b\u3002B\u22672A\u306e\u3068\u304d\u3001B\u306fA\u4ee5\u4e0b\u306b\u306a\u308b\u306e\u3067\u5143\u306e\u534a\u5206\u4ee5\u4e0b\u3002B&lt;2A\u306e\u3068\u304d\u3001B-A&lt;1\/2B\u306a\u306e\u3067\u5143\u306e\u534a\u5206\u4ee5\u4e0b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">E: N\u304c\u5c0f\u3055\u3044\u3068\u3053\u308d\u304c\u72d9\u3044\u76ee\u3002set\u306b\u5206\u304b\u3063\u3066\u3044\u308b\u6255\u3044\u65b9\u3092\u8a70\u3081\u308b\u3053\u3068\u306b\u3057\u3066\u3001\u4e00\u756a\u5c0f\u3055\u3044\u3082\u306e\u304b\u3089\u9806\u306b\u53d6\u308a\u51fa\u3057\u3066\u305d\u3053\u304b\u3089\u306e\u9077\u79fb\u5148\u3092\u65b0\u305f\u306b\u8a70\u3081\u308c\u3070\u3088\u3044\u3002$O(NK\\log (NK))$\u304f\u3089\u3044\u3067\u89e3\u3051\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">F: \u671f\u5f85\u5024\u306e\u5b9a\u7fa9\u304b\u3089\u3001\u6c42\u3081\u308b\u3079\u304d\u306f$\\sum_{A=1}^H \\sum_{B=1}^W (\u6700\u5c0f\u9577\u65b9\u5f62\u304cA\\times B\u306b\u306a\u308b\u30d1\u30bf\u30fc\u30f3\u6570)\\times A\\times B$\u3068\u306a\u308b\u3002\u300c\u6700\u5c0f\u9577\u65b9\u5f62\u304cA\u00d7B\u306b\u306a\u308b\u30d1\u30bf\u30fc\u30f3\u6570\u300d\u3092\u6c42\u3081\u308b\u306e\u306f\u3064\u3089\u3044\u304c\u3001\u300cA\u00d7B\u306e\u9577\u65b9\u5f62\u306bK\u30de\u30b9\u3092\u53ce\u3081\u308b\u30d1\u30bf\u30fc\u30f3\u6570\u300d\u306f\u5358\u7d14\u306b$_{AB}C_K$\u3067\u6c42\u3081\u3089\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u8d77\u70b9\u306b\u5305\u9664\u3092\u3084\u3063\u3066\u3044\u304f\u3068\u826f\u3055\u305d\u3046\u306a\u611f\u3058\u304c\u3059\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u306b\u306f\u6700\u5c0f\u9577\u65b9\u5f62\u304c(A\u672a\u6e80)\u00d7(B\u672a\u6e80)\u3067\u3042\u308b\u3088\u3046\u306a\u9078\u3073\u65b9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u53d6\u308a\u9664\u3044\u3066\u3044\u3051\u3070\u3088\u3044\u3002(A\u672a\u6e80)\u00d7(B\u672a\u6e80)\u306e\u6700\u5c0f\u9577\u65b9\u5f62\u306e\u30d1\u30bf\u30fc\u30f3\u6570\u306f\u5168\u3066\u6c42\u307e\u3063\u3066\u3044\u308b\u3082\u306e\u3068\u3059\u308b\u3068\u3001\u305d\u308c\u3089\u5168\u3066\u3092\u53d6\u308a\u9664\u3051\u3070\u3088\u3044\u3002A\u00d7B\u306e\u9577\u65b9\u5f62\u306b\u53ce\u3081\u308b\u30d1\u30bf\u30fc\u30f3\u6570\u306b\u306f\u3001P\u00d7Q\u306e\u6700\u5c0f\u9577\u65b9\u5f62\u306e\u30d1\u30bf\u30fc\u30f3\u304c$(A-P+1)\\times(B-Q+1)$\u500b\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u3053\u308c\u3092\u5dee\u3057\u5f15\u304f\u3002\u6700\u5f8c\u306b\u3001(A\u00d7B\u306e\u6700\u5c0f\u9577\u65b9\u5f62\u306e\u30d1\u30bf\u30fc\u30f3\u6570)\u00d7(H-A+1)\u00d7(W-B+1)\u306e\u7dcf\u548c\u3092\u53d6\u308c\u3070\u3088\u3044\u3002\u3053\u308c\u3067\u3068\u308a\u3042\u3048\u305a\u611a\u76f4$O(H^2W^2)$\u3067\u89e3\u3051\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3042\u3068\u306f\u3053\u308c\u3092\u9ad8\u901f\u5316\u3059\u308b\u3002\u5358\u7d14\u306b\u7dcf\u548c\u3092\u53d6\u308c\u3070\u826f\u3044\u304b\u3068\u601d\u3044\u304d\u3084\u3001$(A-P+1)\\times(B-Q+1)$\u3068\u3044\u3046\u4fc2\u6570\u304c\u5909\u5316\u3059\u308b\u306e\u3067\u53b3\u3057\u3044\u3002\u5f0f\u3092\u5c55\u958b\u3059\u308b\u3068\u9805\u3054\u3068\u306b\u5206\u96e2\u3067\u304d\u308b\u306e\u3067\u30014\u3064\u306b\u5206\u96e2\u3057\u3066\u7dcf\u548c\u3092\u53d6\u308b\u3068\u901a\u308b\u3002\u7a4d\u306e\u548c\u5178\u578b\u3068\u3044\u3046\u3084\u3064\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">G: \u5148\u624b\u5f8c\u624b\u304c\u5e73\u7b49\u306a\u30b2\u30fc\u30e0\u304c\u8907\u6570\u4e26\u7acb\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u5168\u3066Grundy\u6570\u3092\u6c42\u3081\u3066xor\u3068\u308c\u3070\u3088\u3044\u3002\u554f\u984c\u306f\u5404\u30b2\u30fc\u30e0\u306eGrundy\u6570\u3092\u6c42\u3081\u308b\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b63\u76f4\u306a\u3093\u3082\u826f\u3044\u8003\u3048\u304c\u601d\u3044\u6d6e\u304b\u3070\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u4f8b\u793a\u306f\u7406\u89e3\u306e\u8a66\u91d1\u77f3\uff01\uff01\u3063\u3066\u8a00\u3063\u3066\u6570\u5b66\u30ac\u30fc\u30eb\u3092\u76fe\u306b\u3057\u306a\u304c\u3089\u5c0f\u3055\u3044N,L,R\u3067\u5b9f\u9a13\u3057\u305f\u3089$\\lceil (N%(L+R))\/L \\rceil$\u3068\u3044\u3046\u5f0f\u304c\u898b\u3048\u305f\u3002\u672a\u8a3c\u660e\u3067\u3053\u308c\u306b\u3057\u305f\u3089\u306a\u3093\u304b\u901a\u3063\u305f\u3002\u30e9\u30c3\u30ad\u30fc\uff01\u8a3c\u660e\u3057\u308d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ex: \u6642\u9593$O(N^4)$\u306e\u7a7a\u9593$O(N^3)$\u306e\u611a\u76f4DP\u306f\u66f8\u3051\u305f\u304c\u3001\u305d\u3053\u304b\u3089\u5148\u306f\u3069\u3046\u306b\u3082\u3067\u304d\u306a\u304b\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7af6\u30d7\u30ed\u3067\u30c6\u30b9\u30c8\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6574\u5099\u3057\u305f\u3002vscode\u3067\u30b3\u30de\u30f3\u30c91\u3064\u3067\u611a\u76f4\u89e3\u3068\u306e\u6bd4\u8f03\u3092\u5b9f\u884c\u3067\u304d\u308b\u3002 https:\/\/github.com\/Kiterai\/compro-template \u5f53\u521d\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092main.cpp &hellip; <\/p>\n<div><a href=\"https:\/\/k.foolslab.net\/dailyreport\/2023-4-9\/\" class=\"more\">Read more &raquo;<span class=\"screen-reader-text\"> &#8220;2023\/4\/9(\u65e5)&#8221;<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4437","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts\/4437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/comments?post=4437"}],"version-history":[{"count":8,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts\/4437\/revisions"}],"predecessor-version":[{"id":4445,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/posts\/4437\/revisions\/4445"}],"wp:attachment":[{"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/media?parent=4437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/categories?post=4437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/k.foolslab.net\/dailyreport\/wp-json\/wp\/v2\/tags?post=4437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}