{"width":"100%","blog_url":"https://tic40.hatenablog.com/","version":"1.0","author_url":"https://blog.hatena.ne.jp/tic40/","published":"2020-09-24 21:16:51","title":"atcoder ABC 087 D - People on a Line","height":"190","categories":["AtCoder","DFS"],"blog_title":"Do Something","type":"rich","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftic40.hatenablog.com%2Fentry%2F2020%2F09%2F24%2F211651\" title=\"atcoder ABC 087 D - People on a Line - Do Something\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u554f\u984c D - People on a Line \u89e3\u6cd5 \u4ee5\u4e0b\u306e\u6709\u5411\u30b0\u30e9\u30d5\u3092\u4f5c\u308a\u3001DFS\u3067\u9802\u70b9\u9593\u306e\u8ddd\u96e2\u306b\u77db\u76fe\u304c\u751f\u3058\u3066\u3044\u306a\u3044\u304b\u3092\u8abf\u3079\u308b\u3002 $ L_i $ \u304b\u3089 $ R_i $ \u307e\u3067\u8ddd\u96e2 $ D_i $ $ R_i $ \u304b\u3089 $ L_i $ \u307e\u3067\u8ddd\u96e2 $ -D_i $ \u305f\u3060\u3057\u3001M\u500b\u306e\u5165\u529b\u304b\u3089\u5f97\u3089\u308c\u308b\u30b0\u30e9\u30d5\u306f\u9023\u7d50\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u306e\u5834\u5408\u3092\u8003\u616e\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002 n\u500b\u5168\u3066\u306e\u70b9\u306b\u3064\u3044\u3066\u8abf\u3079\u308b\u3053\u3068\u3067\u3001\u9023\u7d50\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3082\u30ab\u30d0\u30fc\u3067\u304d\u308b\u3002 #include <bits/stdc++.h> using namespace std; #define COUT(x) cout<<(x)<<\"\\n\" #def\u2026","image_url":null,"author_name":"tic40","provider_url":"https://hatena.blog","url":"https://tic40.hatenablog.com/entry/2020/09/24/211651"}