摘要: 代码: 对a数组离散化 void Discretization(int *a,int n) { int b[n+2]; for(int i=1;i<=n;i++) b[i]=a[i]; sort(b+1,b+n+1); int size=unique(b+1,b+n+1)-b-1;//size为离散 阅读全文
posted @ 2019-01-22 22:25 liuyongliu 阅读(297) 评论(0) 推荐(0)
摘要: MingSD's KMP 阅读全文
posted @ 2019-01-22 22:23 liuyongliu 阅读(96) 评论(0) 推荐(0)
摘要: 传送门 阅读全文
posted @ 2019-01-22 22:17 liuyongliu 阅读(149) 评论(0) 推荐(0)
摘要: 一:知识点 欧拉函数参考1 浅谈欧拉函数参考2 欧拉函数的定义: 在数论中,对于正整数N,少于或等于N ([1,N]),且与N互质(即gcd为1)的正整数(包括1)的个数,记作φ(n)。 欧拉函数的延伸: 小于或等于n的数中,与n互质的数的总和为:φ(x) * x / 2 (n>1)。 (如果mod 阅读全文
posted @ 2019-01-22 20:28 liuyongliu 阅读(378) 评论(0) 推荐(0)
摘要: C. Classy Numbers C. Classy Numbers time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Let' 阅读全文
posted @ 2019-01-22 12:38 liuyongliu 阅读(247) 评论(0) 推荐(0)