线性筛素数
摘要:
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <math.h>const int N = 10000000;bool a[N];int p[N];using namespace std;void debug( ){ #ifdef P freopen("out","w",stdout); #endif } void prime( ){ debug( ); memset(a, 0, N*sizeof(a[0])); int nu 阅读全文
posted @ 2011-07-29 20:58 more think, more gains 阅读(143) 评论(0) 推荐(0) 编辑