{"description":"permutations\u3092\u4f7f\u308f\u305a\u306b\u3001\u6628\u65e5\u66f8\u3044\u305fn-Queen\u3092\u66f8\u304d\u76f4\u3057\u3066\u307f\u305f\u3002 \u5168\u5217\u6319\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u5c11\u3057\u3060\u3051\u901f\u5ea6\u304c\u6539\u5584\u3055\u308c\u305f\u3002 \u3057\u304b\u3057\u3001\u307e\u3060\u307e\u3060\u6539\u5584\u306e\u4f59\u5730\u3042\u308a\u3002 import Data.List type Pos = Int main = getLine >>= print.nQueen.read nQueen :: Int -> [Pos] nQueen n = backtrack n [] --\u99d2\u304c\u4ed6\u306e\u30af\u30a4\u30fc\u30f3\u306b\u3068\u3089\u308c\u306a\u3044 notTaken ::[Pos] -> Bool notTaken [_] = True notTaken ls = notSlanting (zip ls [1..]\u2026","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwvogel00.hatenadiary.org%2Fentry%2F20120113%2F1326439882\" title=\"n-Queen(2) - wvogel\u65e5\u8a18\" 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/wvogel00/","blog_url":"https://wvogel00.hatenadiary.org/","blog_title":"wvogel\u65e5\u8a18","title":"n-Queen(2)","provider_url":"https://hatena.blog","width":"100%","published":"2012-01-13 16:31:22","version":"1.0","categories":["Haskell"],"image_url":null,"provider_name":"Hatena Blog","type":"rich","url":"https://wvogel00.hatenadiary.org/entry/20120113/1326439882","author_name":"wvogel00"}