TopCoderの問題をちょっと解いてみた。

『問題を解くこと』より『解法をC++に翻訳すること』の方が難しいです。
permutationが欲しいです、combinationが欲しいです、powersetが(ry