From dca70f3ff8aa6e0a7b2a9ceb06d8b7f1f8d550c2 Mon Sep 17 00:00:00 2001 From: mzuenni Date: Tue, 31 Jan 2023 16:28:59 +0100 Subject: added new code --- other/sos.cpp | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 other/sos.cpp (limited to 'other/sos.cpp') 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 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]; +}}} -- cgit v1.2.3