{"description":"\u96e3\u3057\u304b\u3063\u305f\u3002 \u307e\u305a\u3042\u308b\u6570\u5217\u306e \uff08\u5076\u6570\u756a\u76ee\u306e\u8981\u7d20\u306e\u548c\uff09\uff1d\uff08\u5947\u6570\u756a\u76ee\u306e\u8981\u7d20\u306e\u548c\uff09\u3067\u3042\u308b\u96c6\u5408\u3092P \uff08\u524d\u534a\u306e\u548c\uff09\uff1d\uff08\u5f8c\u534a\u306e\u548c\uff09\u3067\u3042\u308b\u96c6\u5408\u3092Q\u3068\u3059\u308bDP[i][j]\u3092i\u500b\u306e\u8981\u7d20\u3092\u6301\u3061\u548c\u304cj\u3067\u3042\u308b\u6570\u5217\u306e\u6570\u3060\u3068\u3059\u308b(\u4e26\u3073\u66ff\u3048\u306f\u9055\u3046\u3082\u306e\u3068\u3059\u308b) \u3059\u308b\u3068n(P)\uff0bn(Q)\u306fDP\u3067\u6c42\u3081\u3089\u308c\u308b\u3002\uff08\uff0a\uff11\uff09\u6b21\u306bn(P\u2229Q)\u3092\u6c42\u3081\u308b \u524d\u534aK\u500b\u306e\u548c\u3092half\u3001\u305d\u306e\u4e2d\u3067\u5076\u6570\u756a\u76ee\u306e\u3082\u306e\u306e\u548c\u3092quarter\u3068\u3059\u308b \uff08\uff0a\uff12\uff09\u305d\u308c\u3067n(P)+n(Q)-n(P\u2229Q)\u3092\u8fd4\u3059 #include <cstring> #include <string> #define MOD 999983 typedef long long LL; usin\u2026","author_url":"https://blog.hatena.ne.jp/a_kawashiro/","author_name":"a_kawashiro","version":"1.0","blog_url":"https://a-kawashiro.hatenablog.com/","provider_url":"https://hatena.blog","type":"rich","published":"2011-03-28 19:57:48","url":"https://a-kawashiro.hatenablog.com/entry/20110328/1301309868","height":"190","image_url":null,"title":"SRM382 div2 hard","blog_title":"a_kawashiro\u306e\u30d6\u30ed\u30b0","categories":["topcoder"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa-kawashiro.hatenablog.com%2Fentry%2F20110328%2F1301309868\" title=\"SRM382 div2 hard - a_kawashiro\u306e\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","width":"100%"}