摘要: 写完忘了账号,试了N久。记搜的时候mod了N次,还是不对。发现自己SB的把solve里面传的值写成int了。。。 阅读全文
posted @ 2018-08-14 20:22 SWHsz 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 大意:求树上路径和mod 3 =0 的点对数。 一开始写的容斥无限智障,后来参考了一下题解,发现根本不用我那种垃圾写法。。。 cpp include include include using namespace std; const int N=100005; int n,rt,head[N],e 阅读全文
posted @ 2018-08-14 17:57 SWHsz 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 算法流程:找到树的重心,删去这个点,递归子树。 题号luogu3806 cpp include include include include include include using namespace std; const int N=10005; inline int read(){ int 阅读全文
posted @ 2018-08-14 16:48 SWHsz 阅读(106) 评论(0) 推荐(0) 编辑