>>422 をみならって私も総当り方式 >>405 を改良しました。
同じく 10点固定
>>405 : http://codepad.org/sthIM457 時間 941ms
>>411 : 同上 時間 380ms
>>418 : http://codepad.org/tyCTn9Ce 時間 110ms
今ひとつオプティマイズの効果がでていないなあ。