摘要: 题面:https://www.cnblogs.com/Juve/articles/11606834.html x: 并差集,把不能分到两个集合里的元素和并到一起,设连通块个数为cnt,则答案为:$2^{cnt}-2$ #include<iostream> #include<cstdio> #incl 阅读全文
posted @ 2019-09-29 20:47 xukl21 阅读(197) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-09-29 11:30 xukl21 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 题面:https://www.cnblogs.com/Juve/articles/11602450.html u: 用差分优化修改 二维差分:给(x1,y1),(x2,y2)加上s: $d[x1][y1]+=s,d[x1][y2+1]-=s,d[x2+1][y1]-=s,d[x2+1][y2+1]+ 阅读全文
posted @ 2019-09-29 11:13 xukl21 阅读(295) 评论(0) 推荐(0) 编辑