树状数组
q435201823
11
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
树状数组模板
早上刚学的,看着别人的代码写了一个适合自己风格的模板。#include<cstdio>#include<cstring>#define MAX 5000//数组大小struct FenwickTree{ int arr[MAX]; int c[MAX]; int n; FenwickTree(int nn) { n = nn;原创 2017-08-13 11:23:49 · 188 阅读 · 0 评论 -
HDU - 5775 - Bubble Sort
P is a permutation of the integers from 1 to N(index starting from 1). Here is the code of Bubble Sort in C++. for(int i=1;i<=N;++i) for(int j=N,t;j>i;—j) if(P[j-1] > P[j]) ...原创 2018-08-15 09:25:47 · 241 阅读 · 0 评论
分享