Table of Contents
Edit on GithubIZhO 2017 - Bank
Author: Benjamin Qi
Time Complexity:
1int N,M;2bitset<1<<20> dp;34int main() {5 setIO(); re(N,M);6 vi a(N), b(M); re(a,b);7 vi cum{0}; trav(t,a) cum.pb(cum.bk+t);8 dp[0] = 1;9 F0R(i,1<<M) if (dp[i]) {10 int sum = 0;
Join the USACO Forum!
Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!