{"title":"Problem 102","published":"2008-11-23 22:27:38","image_url":null,"categories":["Project Euler","Haskell"],"type":"rich","width":"100%","blog_url":"https://jeneshicc.hatenadiary.org/","height":"190","version":"1.0","author_name":"jeneshicc","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20081123%2F1227446858\" title=\"Problem 102 - \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/","description":"http://projecteuler.net/index.php?section=problems&id=102\u4e09\u89d2\u5f62\u306e\u5185\u90e8\u5224\u5b9a\u3002 \u5916\u7a4d\u3092\u4f7f\u3046\u3068\u697d\u3002\u304b\u306a\u3002 import Data.List cross (x,y) (u,v) = x*v-y*u containO [x,y,z] = sameSign.map (uncurry cross)$[(x,y),(y,z),(z,x)] where sameSign xs = all (>0) xs || all (<0) xs toTuples = unfoldr t where t [] = Nothing t (x:y:zs) = Just (\u2026","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","url":"https://jeneshicc.hatenadiary.org/entry/20081123/1227446858"}