摘要:
SG函数//f[N]:可改变当前状态的方式,N为方式的种类,f[N]要在getSG之前先预处理//SG[]:0~n的SG函数值//S[]:为x后继状态的集合int f[N],SG[MAXN],S[MAXN];vo... 阅读全文
posted @ 2019-10-09 22:18
月光下の魔术师
阅读(14)
评论(0)
推荐(0)
摘要:
HDU4389打表模板#include using namespace std;int const step = 1e6;int const N = 1e3 + 10;int const M = 1e9;int ... 阅读全文
posted @ 2019-10-09 22:17
月光下の魔术师
阅读(23)
评论(0)
推荐(0)
摘要:
ll qpow(ll a,ll n){ ll ans = 1; while(n){ if(n & 1) ans = ans * a % mod; a = a * a % mod; n >>= 1; } re... 阅读全文
posted @ 2019-10-09 22:16
月光下の魔术师
阅读(4)
评论(0)
推荐(0)
摘要:
威尔逊定理:若p为质数,则p|(p-1)!+1 亦:(p-1)! ≡ p-1 ≡ -1(mod p)HDU2973题解:若3k+7是质数,那么Sn = n(对应一项为1),否则Sn = 0#include usi... 阅读全文
posted @ 2019-10-09 22:16
月光下の魔术师
阅读(28)
评论(0)
推荐(0)
摘要:
求线性基模板#include using namespace std;typedef long long ll;int const N = 1e5 + 10;int maxbit = 64;ll a[N],p[N... 阅读全文
posted @ 2019-10-09 22:15
月光下の魔术师
阅读(13)
评论(0)
推荐(0)
摘要:
HDU1530题解基础:我们令cnum[i]表示点i到n中的最大团大小,则有cnum[i] = cnum[i + 1] 或cnum[i + 1] + 1,也就是说具有单调性(类似于DP),这样我们可以利用这个性质... 阅读全文
posted @ 2019-10-09 22:07
月光下の魔术师
阅读(8)
评论(0)
推荐(0)

浙公网安备 33010602011771号