题解: 比较水 注意k<=100这个条件 当n-k比较大的时候 我们显然会把它有的位都给取了 不然的话我们可以考虑dp 暴力状压就可以了 代码: #include <bits/stdc++.h> using namespace std; #define rint register int #define IL inline #define rep(i,h,t) for (rint i=h;i<=t;i++) #define dep(i,t,h) for (rint i=t;i>…
题目:House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected a…