![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 54
Dstan90
在下火星人。擅长各种电脑的开机和关机。
展开
-
hdoj 1004
Let the Balloon Rise Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and f原创 2021-10-13 00:27:02 · 119 阅读 · 0 评论 -
day3-简单dp-最长子序列和问题
最长子序列问题 题目描述 给一个序列 求最大子序列的和 例如 1 2 3 4 -1 5 最大和就是全部加起来 比如 1 -2 3 1 -5 4 5 5 5 5 5 5 3 1 2 如此 就是-5后面的和加起来 那么 最大的和出现的位置 可能是前面。也可能是后面 那么我们需要一个数组记录第i个和 #include <iostream> #include <limits.h> using namespace std; #define _rep(i,a,b) for(int i=(a);i原创 2021-10-01 23:42:03 · 126 阅读 · 0 评论 -
day2-并查集
模板代码 可以再优化的 #include <iostream> using namespace std; const int Max=1e4+5; int a[Max]; int aux[Max]; void init(int n){ for(int i=1;i<=n;i++){ a[i]=i; aux[i]=0; } } int find_set(int x){ return x==a[x]?x:find_set(a[x]); }原创 2021-10-01 00:58:13 · 106 阅读 · 0 评论 -
蒟蒻blogDay1-差分数组-线段树
rrrr原创 2021-09-28 01:00:04 · 92 阅读 · 0 评论