虽然写出了代码,但是还是不懂,玄关。
for(int i=0;i<(1<<m);i++) for(int j=1;j<=n;j++) dp[i|v[j]]=min(dp[i|v[j]],dp[i]+1);