题目传送门 传送门I 传送门II 题目大意 给定一个$n\times m$的网格,每个格子上要么填$1$,要么填$-1$,有$k$个位置上的数是已经填好的,其他位置都是空的.问有多少种填法使得任意一行或一列上的数的乘积为$-1$. $1 \leqslant n, m \leqslant 10^{3}$,$1 \leqslant k < \max (n, m)$. $k$的范围醒目.那么意味着至少存在一行或者一列为空. 假设空的是一行.那么剩下的行只需要满足那一行的乘积为$-1$,而空的这一行对应…