摘要: Q:Given an integer, return all sequences of numbers that sum to it. (Example: 3 -> (1, 2), (2, 1), (1, 1, 1)).A:class CalcSequenceNumber{private: static void print(int values[], int n) { for (int i = 0; i < n; ++i) // n may be less then length of values[] { cout << " "... 阅读全文
posted @ 2013-01-23 16:24 百分百好牛 阅读(639) 评论(0) 推荐(0) 编辑