nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 无限大的棋盘有一只走‘日’的马呆在0,0处,也是坐标原点,(存在四个象限),给你(x,y)问你要至少跳多少步才能跳过去 不妨设$x>y$ $x\le2y$,可以证明当x和y足够大的时候 $(x+y)\mod3=0$时,我们只需要$\frac{x+y}{3}$步,这些步数由两种跳跃组成,他们分别是(1,2)和(2,1) $(x+y)\mod...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 就像cantor映射一样,字符串hash采取一种更加随机化的映射,它的通项公式为$hash[i]=\sum...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 123456789101112131415161718192021222324252627282930313233343536inline void GetNext(char *s) { int l = strlen(s), t; next[0] = -1; for (int i = 1; i < l; ++i) { t = next[i - 1];...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051const double eps=1e-8;struct MCMF{ static const int maxn=200,maxm=40000; struct star{int...