- 博客(3)
- 收藏
- 关注
原创 树状数组
单点修改,区间查询: int n,m; int E[maxn]; void add(int x,int v){ while(x<=n){ E[x]+=v; x+=lowbit(x); } } int query(int x){ int ans=0; while(x>0){ ans+=E[x]; ...
2018-10-02 18:31:59
84
原创 HDU 6301 Distinct Values(优先队列做法)
题目: http://acm.hdu.edu.cn/showproblem.php?pid=6301 Chiaki has an array of n positive integers. You are told some facts about the array: for every two elements ai and aj in the subarray al..r (l≤i<...
2018-07-24 16:31:44
118
原创 线段树写法
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 108743 Accepted Submission(s): 45680Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek...
2018-03-23 22:31:26
225
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人