{"title":"SRM624 Div2Med BuildingHeightsEasy","author_url":"https://blog.hatena.ne.jp/moistx/","height":"190","width":"100%","url":"https://logfiles.hatenablog.com/entry/20140613/1402672143","version":"1.0","blog_url":"https://logfiles.hatenablog.com/","published":"2014-06-13 00:09:03","image_url":null,"provider_name":"Hatena Blog","blog_title":"Logfiles","categories":["SRM"],"provider_url":"https://hatena.blog","author_name":"moistx","description":"\u89e3\u6cd5 \u30bd\u30fc\u30c8\u3057\u3066\u533a\u9593[i, i+M)\u3092\u8db3\u3057\u305f\u3082\u306e\u3092\u3059\u3079\u3066\u8abf\u3079\u308b\u3002heights[i+M-1]*M \u3068\u306e\u5dee\u5206\u304c\u6700\u5c0f\u306e\u3068\u304d\u3001\u305d\u306e\u5dee\u5206\u3092\u51fa\u529b\u3059\u308b\u3060\u3051\u3002 #include <bits/stdc++.h> using namespace std; #define allof(x) (x).begin(), (x).end() class BuildingHeightsEasy { public: int minimum(int M, vector <int> H) { sort(allof(H)); int ans = INT_MAX; for(int i=0; i<H.size(); i++) { i\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140613%2F1402672143\" title=\"SRM624 Div2Med BuildingHeightsEasy - Logfiles\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich"}