Created
August 7, 2019 15:35
-
-
Save Thiago4532/a58db394778d484769f87b090ca6c871 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iterando em todas as mask's | |
| for (int mask = 0; mask < (1<<n); mask++){ | |
| F[mask] = A[0]; | |
| // iterando em todos os subconjuntos de mask | |
| for(int i = mask; i > 0; i = (i-1) & mask){ | |
| F[mask] += A[i]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment