| 17 | } |
| 18 | |
| 19 | int main() { |
| 20 | vector<int> comb = {1, 3, 6}; |
| 21 | vector<int> next = {1, 4, 5}; |
| 22 | next_combination(comb, 6); |
| 23 | assert(next == comb); |
| 24 | |
| 25 | string all = "123\n134\n234\n124\n145\n245\n345\n135\n235\n125\n"; |
| 26 | Naive::all_combinations(5, 3); |
| 27 | assert(Naive::cout.str() == all); |
| 28 | |
| 29 | string all2 = "345\n235\n234\n245\n125\n124\n123\n135\n134\n145\n"; |
| 30 | Fast::all_combinations(5, 3); |
| 31 | assert(Fast::cout.str() == all2); |
| 32 | } |
nothing calls this directly
no outgoing calls
no test coverage detected