なんとな~くしあわせ?の日記

「そしてそれゆえ、知識そのものが力である」 (Nam et ipsa scientia potestas est.) 〜 フランシス・ベーコン

2017-04-21から1日間の記事一覧

AOJ - ITP1_7_B (組み合わせ) を解いてみた

偉そうに書いてるが、これは序の口の問題である。。。 AOJ - ITP1_7_B 解法1 algorithm - Finding all possible combinations of numbers to reach a given sum - Stack Overflow アルゴリズム 処理フロー 結果 解法2 Given an array A[] and a number x, …

Bash/Octaveで順列・組み合わせ

Bashで計算しようとしたのだが、結論から言うと遅すぎて使えない。Octaveで計算すると早かったのでそっちを推奨する。 Bash 順列 (nPr) bash - Generate combinations of elements with echo - Stack Overflow 参考になったが、これはCombinationではなくPer…