{"image_url":null,"height":"190","blog_title":"C\u266f\u306e\u52c9\u5f37","provider_url":"https://hatena.blog","blog_url":"https://emkcsharp.hatenablog.com/","version":"1.0","title":"TopCoder SRM606: EllysPairing ","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Femkcsharp.hatenablog.com%2Fentry%2FSRM606%2FEllysPairing\" title=\"TopCoder SRM606: EllysPairing  - C\u266f\u306e\u52c9\u5f37\" 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":"Practice \u3060\u3068 return 0; \u3059\u308b\u3060\u3051\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3082 StackOverFlow \u306b\u306a\u3063\u3066\u30b7\u30b9\u30c6\u30e0\u30c6\u30b9\u30c8\u3067\u6b63\u5f53\u30c1\u30a7\u30c3\u30af\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u3002\u4e00\u756a\u51fa\u73fe\u6570\u304c\u591a\u3044\u540d\u524d f \u306e\u51fa\u73fe\u6570\u3092 x \u3068\u3059\u308b\u3002x \u304c\u5168\u540d\u524d\u306e\u904e\u534a\u6570\u4ee5\u4e0b\u306e\u5834\u5408\u306f\u3001\u30da\u30a2\u306e\u6700\u5927\u6570 floor(\u540d\u524d\u306e\u500b\u6570 / 2) \u304c\u305d\u306e\u307e\u307e\u7b54\u3048\u306b\u306a\u308b\u3002\u904e\u534a\u6570\u3088\u308a\u591a\u3044\u5834\u5408\u306f\u3001\u5168\u3066\u306e\u30da\u30a2\u306b f \u304c\u542b\u307e\u308c\u308b\u3053\u3068\u304b\u3089 f \u4ee5\u5916\u306e\u500b\u6570\u304c\u7b54\u3048\u306b\u306a\u308b\u3002\u6570\u5f0f\u5316\u3059\u308b\u3068 min(total / 2, total - x) \u306b\u306a\u308b\u305f\u3081\u3001\u5f8c\u306f x \u3092\u6c42\u3081\u308b\u3002 \u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u304c 16MB \u3057\u304b\u306a\u3044\u305f\u3081\u3001\u5168\u6570\u5217\u3092\u751f\u6210\u3057\u305f\u308a\u3001Set \u306b\u3044\u308c\u3066\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3092\u53d6\u3063\u305f\u308a\u3059\u308b\u3068\u30e1\u30e2\u2026","published":"2015-02-01 10:56:41","author_url":"https://blog.hatena.ne.jp/EmK/","width":"100%","author_name":"EmK","url":"https://emkcsharp.hatenablog.com/entry/SRM606/EllysPairing","categories":["TopCoder","Div1","Div1Medium"]}