BZOJ3129方程(SDOI2013) https://blog.csdn.net/Maxwei_wzj/article/details/80152116 对变量有上界限制及下界限制。对于下界,可以从总数中减去即可,对于上界,容斥定理。