摘要:
传送门 洛谷P2580的一个水题,用啥都能过,不过为了练习一下刚刚学会的字典树,还是认真做一下吧。 #include <cstdio> #include <cstring> using namespace std; #define idx(x) x - 'a' int n, m, nex; stru 阅读全文
摘要:
树状数组 支持单点修改 #include <cstdio> using namespace std; int n, m; int a[500001], c[500001]; int lowbit(int x) { return x & -x; } int sum(int x) { int ans = 阅读全文