![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
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 · 155 阅读 · 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 · 165 阅读 · 0 评论