摘要: 传送门 题解传送门 吉司机线段树。 奥妙重重。 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<vector> #include< 阅读全文
posted @ 2018-01-18 22:09 啊宸 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 传送门 先筛出m以内的质数,g[i]表示i是否是素数 f[i][j]表示前n堆数异或和为j的方案数。 f[0][0]=1; f[0][1]~f[0][m]=0; f[i][j] = sigma( f[i-1][k] * g[k^j] ) 发现这个玩意满足乘法结合律 ∴ f[n][] = sigma( 阅读全文
posted @ 2018-01-18 22:09 啊宸 阅读(277) 评论(0) 推荐(0) 编辑