数论
文章平均质量分 81
Who_is_WZX
这个作者很懒,什么都没留下…
展开
-
两道容斥题
B - The Secret of Identifier Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice URAL 1932 Description Davy Jones: You've been captain原创 2013-08-27 20:49:30 · 714 阅读 · 0 评论 -
Gao the Grid zoj3647(数论)
Description A n * m grid as follow: Count the number of triangles, three of whose vertice must be grid-points. Note that the three vertice of the triangle must not be in a line(the right pi原创 2013-08-15 19:34:06 · 703 阅读 · 0 评论 -
线性筛数法
我们知道合数可以由一个质数数与另一个数相乘得到 而同时假设合数a=质数b×质数c×一个数d 令e=c × d,假设b ≥ e,e为合数,令f=d × b a=f × c ,其中c 即比一个合数数大的质数和该合数的乘积可用一个更大的合数和比其小的质数相乘得到 这也是if(!( i % prime[j]))break;的含义,这也是线性筛法算质数表的关键所在 利用了每个合数必有一个最小素因转载 2013-10-26 10:47:58 · 733 阅读 · 0 评论