{"version":"1.0","blog_title":"Logfiles","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140929%2F1411947393\" title=\"yukicoder no.3 \u30d3\u30c3\u30c8\u3059\u3054\u308d\u304f - Logfiles\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://logfiles.hatenablog.com/","provider_name":"Hatena Blog","url":"https://logfiles.hatenablog.com/entry/20140929/1411947393","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/moistx/","width":"100%","title":"yukicoder no.3 \u30d3\u30c3\u30c8\u3059\u3054\u308d\u304f","height":"190","categories":["yukicoder"],"author_name":"moistx","image_url":null,"published":"2014-09-29 08:36:33","type":"rich","description":"\u554f\u984c\u6587 http://ch.nicovideo.jp/programing/blomaga/ar583624\u89e3\u7b54 __builtin_popcount() + \u5e45\u512a\u5148\u63a2\u7d22 \u3059\u308b\u3002\u6700\u77ed\u7d4c\u8def\u554f\u984c\u3067\u3042\u308b\u3002 #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int const INF = 1<<29; bool vis[10001] = {}; queue<pair<int, int> > q; q.push(make_pair(1, 1)); while(!q.empty()) { int now \u2026"}