sicily 1363. Semi-prime H-numbers
摘要:
#include <iostream> //线性筛+树状数组#include<stdio.h>using namespace std;#define Max 1000010int n,table[Max],vis[Max],prime[80000];int lowbit(int x){ return x&(-x);}void modify(int x){ if(vis[x]==0) { vis[x]=1; while(x<Max) { table[x]++; x+=lowbit(x); } }}int getsum(int x){ int s=0; whi 阅读全文
posted @ 2011-07-15 15:59 sysu_mjc 阅读(167) 评论(0) 推荐(0) 编辑