完全没有思路,状压到死没调出来……吐槽一下这题目描述的好不清楚啊好多人都理解错题了…… 题解: 真的挺神仙的,因为有每列最多放1个的限制,所以考虑按列dp,设f[i][j]表示考虑前i列在[1,i]中的右区间中有j个1,初始状态f[0][0]=1;注:以下右区间表示[r[u],m]; 记录l,r的前缀和sl,sr,但是这两个数组的含义并不一样,sl[i]表示前i列中有多少行左区间已经结束,sr[i]表示的则是前i列中有多少行右区间已经开始. 转移:首先只考虑第i列,枚举右区间1的个数j,如果第i…