Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void f(int n) {
- if (n%2) {
- return;
- }
- int* set = // инит через malloc !
- findComb(set, 0, n);
- }
- void findComb(int* set, int curr, int n) {
- if (curr == n) {
- if (checkComb(set, n)) {
- prinComb(set, n));
- }
- }
- else {
- set[curr] = 0;
- getComb(set, curr + 1, n);
- set[curr] = 1;
- getComb(set, curr + 1, n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement