Skip to content

Instantly share code, notes, and snippets.

@Thiago4532
Created August 7, 2019 15:32
Show Gist options
  • Select an option

  • Save Thiago4532/8fa569d0b0cceca90d4156e644cf2ca8 to your computer and use it in GitHub Desktop.

Select an option

Save Thiago4532/8fa569d0b0cceca90d4156e644cf2ca8 to your computer and use it in GitHub Desktop.
for(int mask = 0;mask < (1<<N); ++mask){
for(int i = 0;i < (1<<N); ++i){
if((mask&i) == i){
F[mask] += A[i];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment