摘要: 【数学】 收录一些用 数学处理手法/纯数学计算推规律 的题目 最小值 https://acm.hdu.edu.cn/contest/problem?cid=1176&pid=1012 题目大意 思路 【看到绝对值】第一个想法是去绝对值->分类讨论 【找序列两数相减绝对值最小】排序,求差分,差分序列最 阅读全文
posted @ 2025-01-17 23:39 White_ink 阅读(22) 评论(0) 推荐(0)
摘要: 【树状数组】 模版代码 struct FenwickTree { vector<int> tree; int size; FenwickTree(int n){ size=n; tree.resize(n+1,0); } void update(int pos, int delta){ for(;p 阅读全文
posted @ 2025-01-17 17:30 White_ink 阅读(16) 评论(0) 推荐(0)