#include <stdio.h>
#include <string.h>
typedef unsigned int uint;
uint pow2(uint a, uint b) {
uint res = 1;
for(uint i = 1; i <= b; ++i) {
res = res * a;
}
return res;
}
void generate_subsets(char *str, uint dim) {
uint n = pow2(2, dim);
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < 3; ++j)
{
if(i & (1<<j)) {
}
}
}
}
int main(int argc, char const *argv[])
{
char *str;
str = "abc";
generate_subsets(str, len);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCnR5cGVkZWYgdW5zaWduZWQgaW50IHVpbnQ7Cgp1aW50IHBvdzIodWludCBhLCB1aW50IGIpIHsKCgkgICB1aW50IHJlcyA9IDE7CgoJICAgZm9yKHVpbnQgaSA9IDE7IGkgPD0gYjsgKytpKSB7CgoJICAgCSAgIHJlcyA9IHJlcyAqIGE7CgkgICB9CgoJICAgcmV0dXJuIHJlczsKfQoKdm9pZCBnZW5lcmF0ZV9zdWJzZXRzKGNoYXIgKnN0ciwgdWludCBkaW0pIHsKICAgICAKCSB1aW50IG4gPSBwb3cyKDIsIGRpbSk7CgoKICAgICBmb3IgKGludCBpID0gMDsgaSA8IG47ICsraSkKICAgICB7CiAgICAgCWZvciAoaW50IGogPSAwOyBqIDwgMzsgKytqKQogICAgIAl7CiAgICAgCQkgaWYoaSAmICgxPDxqKSkgewoKICAgICAgICAgICAgICAgIHByaW50ZigiJWMiLCBzdHJbal0pOwogICAgIAkJIH0KICAgICAJfQoKICAgICAJcHJpbnRmKCJcbiIpOwogICAgIH0KCn0KCmludCBtYWluKGludCBhcmdjLCBjaGFyIGNvbnN0ICphcmd2W10pCnsKCWNoYXIgKnN0cjsKCglzdHIgPSAiYWJjIjsKCQoJdWludCBsZW4gPSBzdHJsZW4oc3RyKTsKCglnZW5lcmF0ZV9zdWJzZXRzKHN0ciwgbGVuKTsKCglyZXR1cm4gMDsKfQ==