{"title":"Problem 161 (C++\u3067)","published":"2008-12-31 15:02:24","height":"190","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","image_url":null,"url":"https://jeneshicc.hatenadiary.org/entry/20081231/1230703344","width":"100%","categories":["Project Euler"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20081231%2F1230703344\" title=\"Problem 161 (C++\u3067) - \u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/jeneshicc/","author_name":"jeneshicc","version":"1.0","provider_name":"Hatena Blog","type":"rich","description":"C++\u3060\u3068\u5b9f\u884c\u6642\u9593\u306f\u3069\u3046\u5909\u308f\u308b\u306e\u304b \u540c\u3058\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u5b9f\u88c5\u3057\u3066\u307f\u305f #include <iostream> #include <map> using namespace std; int h=12,w=9; int area[][3]={{0,w,w+1},{0,w,w-1},{0,w+1,1},{0,w,1},{0,w,2*w},{0,1,2}}; bool inBoard(int x,int t){ switch(t){ case 1: return x/w<h-1 && x%w>0; case 4: return x/w<h-2; case 5: return x%w<w-2; defa\u2026","provider_url":"https://hatena.blog","blog_url":"https://jeneshicc.hatenadiary.org/"}