Skip to content

Instantly share code, notes, and snippets.

@ofx
ofx / Subset Sum
Last active August 29, 2015 14:00
#include <math.h>
#include <stdio.h>
int S[] = {-7, -3, -2, 5, 8};
int main()
{
unsigned int i, n, a, j, nn, ui;
n = pow(2, sizeof(S) / sizeof(int)) - 1;
ui = sizeof(S) / sizeof(int);