标签:
1 void make_prime() { 2 rst(prime, 0); 3 for(int i = 2; i < maxn; i++) { 4 if(!prime[i]) { 5 primes[++cnt ]=i; 6 for (int j = i*2; j < maxn; j += i) { 7 prime[j] = 1; 8 } 9 } 10 } 11 return; 12 }
标签:
原文地址:http://www.cnblogs.com/mitrenick/p/4772816.html