随笔分类 -  0.1.8-----acm之路

摘要:[toc] 筛法 所谓筛法是一种思想,就像名字一样,筛去多余的,筛去错误的。多数情况用数组标记,复杂度看起来很大,但代码跑起来确是越跑越快。 素数筛法 问题引入 把n以内素数全找出来(n include int isprime(int n) { n = sqrt(n); for(int i = 2; 阅读全文
posted @ 2018-09-14 08:47 nerd呱呱 阅读(2228) 评论(0) 推荐(0)