摘要:
hoj1867:http://acm.hit.edu.cn/hoj/problem/view?id=1867题意:c个连锁店,n条指令,每间店的初始商品数量。有两种指令:x,y,z,若x=0,表示第y个店的数目增加z,若x=1,表示查询店y到z中商品数量为素数的个数解法:树状数组code:#include<iostream>#include<cstdio>#include<cstdlib>const int maxn=1000010;int a[maxn],v[maxn]; //a为商品数目,v为素数个数int prime(int x) //判断素... 阅读全文
posted @ 2012-08-05 22:37
acmer-jun
阅读(260)
评论(0)
推荐(0)

浙公网安备 33010602011771号