{"published":"2023-07-10 15:17:26","provider_url":"https://hatena.blog","url":"https://baitop.hatenadiary.jp/entry/2023/07/10/151726","author_url":"https://blog.hatena.ne.jp/baitop/","blog_title":"\u30d0\u30a4\u30c8\u306e\u7af6\u30d7\u30ed\u30e1\u30e2","height":"190","title":"AtCoder Regular Contest 164 D - 1D Coulomb","categories":["\u4e3b\u5ba2\u8ee2\u5012","\u6570\u3048\u4e0a\u3052","\u62ec\u5f27\u5217"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaitop.hatenadiary.jp%2Fentry%2F2023%2F07%2F10%2F151726\" title=\"AtCoder Regular Contest 164 D - 1D Coulomb - \u30d0\u30a4\u30c8\u306e\u7af6\u30d7\u30ed\u30e1\u30e2\" 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","description":"D - 1D Coulomb \u30e1\u30e2 \u4ee5\u5f8c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a00\u8449\u3092\u5b9a\u7fa9\u3059\u308b S[i] := i\u306e\u96fb\u8377(+\u304b-) R(s) := s\u3068\u9006\u306e\u96fb\u8377, R(+) == -, R(-) == + cnt(i, s) := [0, i)\u306b\u3042\u308b\u7b26\u53f7s\u306e\u6570(\u3064\u307e\u308ai\u3088\u308a\u5de6\u306b\u3042\u308bs\u306e\u500b\u6570) \u307e\u305a\u5404i\u304c\u3069\u3061\u3089\u306b\u52d5\u304f\u304b\u3092\u8003\u3048\u308b i\u304c+\u306e\u5834\u5408\u3001i\u4ee5\u5916\u306e\u5408\u8a08\u306f-1\u306b\u306a\u308a i\u304c-\u306e\u5834\u5408\u3001i\u4ee5\u5916\u306e\u5408\u8a08\u306f+1\u306b\u306a\u308b \u3088\u3063\u3066\u5de6\u53f3\u3069\u3061\u3089\u304b\u306e\u5408\u8a08\u304c0\u306e\u6642\u3001\u96fb\u8377\u306f\u9006\u65b9\u5411\u306b\u52d5\u304f\u305f\u3081 \u4e00\u756a\u5de6\u306e\u96fb\u8377\u306f\u53f3\u306b\u52d5\u304d\u3001\u4e00\u756a\u53f3\u306e\u96fb\u8377\u306f\u5de6\u306b\u52d5\u304f\u3002 \u4ee5\u5f8c\u540c\u69d8\u306b\u8003\u3048\u308b\u3068\u3001\u5404\u96fb\u8377\u306f\u62ec\u5f27\u5217\u306e\u5bfe\u5fdc\u306e\u3088\u3046\u306b\u52d5\u304f\u3053\u3068\u304c\u5206\u304b\u308b\u3002 \u5177\u4f53\u7684\u306b\u306f cnt(i, s[i]) >= \u2026","type":"rich","author_name":"baitop","version":"1.0","blog_url":"https://baitop.hatenadiary.jp/","width":"100%","image_url":null}