砝码问题
#include <iostream>
#include <algorithm>
#include <cstring>
#include <bitset>
using namespace std;
bitset<10004> bs;
int cnt[7], a[7] = {0, 1, 2, 3, 5, 10, 20};
int main(){
bs[0] = 1;
for(int i = 1; i <= 6; i++) cin >> cnt[i];
for(int i = 1; i <= 6; i++)
for(int j = 1; j <= cnt[i]; j++)
bs |= bs << a[i];
cout << "Total=" << bs.count() - 1 << endl;
}