Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,31 @@
#include <stdio.h>
struct node {
char *s;
struct node* prev;
};
void powerset(char **v, int n, struct node *up)
{
struct node me;
if (!n) {
putchar('[');
while (up) {
printf(" %s", up->s);
up = up->prev;
}
puts(" ]");
} else {
me.s = *v;
me.prev = up;
powerset(v + 1, n - 1, up);
powerset(v + 1, n - 1, &me);
}
}
int main(int argc, char **argv)
{
powerset(argv + 1, argc - 1, 0);
return 0;
}