これ見て勉強しよう
https://w.atwiki.jp/cubepicross/pages/86.html