diff options
Diffstat (limited to 'other/sos.cpp')
| -rw-r--r-- | other/sos.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/other/sos.cpp b/other/sos.cpp new file mode 100644 index 0000000..0fe5dc0 --- /dev/null +++ b/other/sos.cpp @@ -0,0 +1,6 @@ +vector<ll> res(in); +for (int i = 1; i < sz(res); i *= 2) { + for (int mask = 0; mask < sz(res); mask++){ + if (mask & i) { + F[mask] += F[mask ^ i]; +}}} |
