2014年2月27日
摘要: 原题链接很巧妙的一道题。我是没能想到这么巧的方法,唉,差距真不是那么一点点啊...附原题标程: #include#define N 1000010int ans[N]={0},a;void prime(){ int i,j,x=0; for( i=2; i#define MAX 1000000 + 2int a[MAX];void Count(){ for(int i = 2, count = 0; i < MAX; ++i){ if(!a[i]){ ++count; for(int j = i; j < MAX; j += i) a[j] = count; //... 阅读全文
posted @ 2014-02-27 17:09 长木Qiu 阅读(107) 评论(0) 推荐(0) 编辑