{"title":"AOJ 0254 Scone","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkujira16.hateblo.jp%2Fentry%2F2015%2F08%2F24%2F115305\" title=\"AOJ 0254 Scone - \u304f\u3058\u3089\u306b\u3063\u304d++\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","height":"190","provider_url":"https://hatena.blog","description":"\u554f\u984c http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0254 \u6982\u8981\uff1aN\u500b\u306e\u6b63\u6574\u6570\u5217 (1 <= N <= 3*104) \u304c\u4e0e\u3048\u3089\u308c\u308b\u3002\u9023\u7d9a\u3059\u308b\u90e8\u5206\u5217\u306e\u548c mod M (1 <= M <= 105) \u3092\u6700\u5927\u5316\u3057\u305f\u3068\u304d\u306e\u5024\u3092\u6c42\u3081\u3088\u3002 O(N3) \u89e3\u6cd5 [begin,end) \u3092O(N2)\u3067\u6c7a\u3081\u3066\uff0c\u548c\u306emod M\u3092O(N)\u3067\u8a08\u7b97\u3059\u308b\u3002 O(N2) \u89e3\u6cd5 \u7d2f\u7a4d\u548c\u30c6\u30fc\u30d6\u30ebpsum\u3092\u524d\u3082\u3063\u3066O(N)\u3067\u69cb\u7bc9\u3057\u3066\u304a\u304f\u3068\uff0c\u548c\u306emod M\u304c(psum[end] - psum[begin] + M) % M\u307f\u305f\u3044\u306a\u611f\u3058\u3067O(1)\u3067\u8a08\u7b97\u3067\u304d\u308b\u3002 [b\u2026","image_url":null,"width":"100%","provider_name":"Hatena Blog","blog_title":"\u304f\u3058\u3089\u306b\u3063\u304d++","published":"2015-08-24 11:53:05","url":"https://kujira16.hateblo.jp/entry/2015/08/24/115305","author_url":"https://blog.hatena.ne.jp/kujira16/","type":"rich","author_name":"kujira16","blog_url":"https://kujira16.hateblo.jp/","categories":[]}