{"url":"https://mayokoex.hatenablog.com/entry/2015/09/23/104414","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2015%2F09%2F23%2F104414\" title=\"Codeforces Round #321 (Div. 2) D. Kefa and Dishes - mayoko\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["CodeForces"],"width":"100%","author_name":"mayokoex","blog_url":"https://mayokoex.hatenablog.com/","provider_name":"Hatena Blog","title":"Codeforces Round #321 (Div. 2) D. Kefa and Dishes","blog_title":"mayoko\u2019s diary","version":"1.0","author_url":"https://blog.hatena.ne.jp/mayokoex/","height":"190","provider_url":"https://hatena.blog","published":"2015-09-23 10:44:14","type":"rich","description":"\u8d77\u304d\u308c\u306a\u304b\u3063\u305f\u306e\u3067 virtual participation \u3067\u53c2\u52a0\u3057\u307e\u3057\u305f\u3002ABCD \u89e3\u3051\u3066\u305d\u3053\u305d\u3053\u3067\u3059\u3002\u305f\u3060 D \u89e3\u304f\u306e\u304c\u9045\u304b\u3063\u305f\u306e\u3067\u53cd\u7701\u3067\u3059\u3002 \u554f\u984c codeforces.com \u89e3\u6cd5 dp[state][f] = (\u4eca\u307e\u3067\u306b\u9078\u3093\u3060\u98df\u4e8b\u304c state \u3067\u8868\u3055\u308c\u3066, \u4e00\u756a\u5148\u982d\u306b\u9078\u3093\u3067\u3044\u308b\u98df\u4e8b\u304c f \u306e\u6642\u306e, \u6700\u5927\u5e78\u798f\u5ea6) \u3068\u3057\u3066, bitDP \u3092\u89e3\u3051\u3070\u826f\u3044\u3067\u3059\u3002 \u5f97\u305f\u77e5\u898b \u6700\u521d state \u3060\u3051\u3092\u72b6\u614b\u3068\u3057\u3066\u300c\u3069\u3053\u306b\u633f\u5165\u3059\u308b\u304b\u300d\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3084\u308d\u3046\u3068\u3057\u3066\u3044\u305f\u304c, \u3088\u304f\u8003\u3048\u308b\u3068\u5148\u982d\u306b\u5165\u308c\u308b\u9806\u756a\u3092\u8003\u3048\u308c\u3070\u3088\u304b\u3063\u305f\u306e\u3067\u4e0a\u306e\u3088\u3046\u306a dp \u3067\u826f\u3044\u3093\u3060\u306a\u3041\u3068 const int MAXN = 20; \u2026"}