自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 《优先队列》使用及操作符重载——C++

C++ 优先队列 头文件             #include 示例 http://acm.hdu.edu.cn/showproblem.php?pid=1509 #include #include #include using namespace std; struct node { char str[100]; int par; int pri;

2015-12-29 22:04:05 2700

原创 《母函数》

#include #include using namespace std; int main() { int n,m,i,j,k; int c1[110],c2[110],min[110],max[110]; while(scanf("%d%d",&n,&m)!=EOF) { memset(c1,0,sizeof(c1)); mem

2015-12-20 22:45:53 389

原创 《筛法求素数》

#include #include #include int vis[100100]; int prime[80000],c; int a[100010]; void get_prime() { int i,j,n,m; c=0; n=100000; m=(int)sqrt(n+0.5); memset(vis,0,sizeof(vis)); for

2015-12-09 11:45:01 426

原创 《树状数组求逆序对数》

#include #include #define maxn 1005 int tree[maxn]; int lowbit(int x) { return x&(-x); } void update(int pos,int num) { while(posmaxn) { tree[pos]+=num; pos+=lowbit(pos);

2015-12-09 09:22:14 570

原创 《矩阵快速幂》

#include #include #include using namespace std; struct node { long long mat[12][12]; }; int n; node mat_mult(node a,node b) { int i,j,k; node c; memset(c.mat,0,sizeof(c.mat)); for(

2015-12-09 00:35:35 240

原创 《一维树状数组》模板

http://acm.hdu.edu.cn/showproblem.php?pid=1166 Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都

2015-12-04 10:28:15 377

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除