4.3k4 分钟

wa了快一个月,原来是维护区间最值的树状数组的更新函数写挂了,:) 这错误写法能过洛谷完全因为它是不带修改的… 正确的: struct BIT { LL h[(int)1e5 + 9], n; void init(int x) { n = x; f(i,1,n)update(i); } void update(int x) { while(x<=n){ h[x]=aa[x];
1.2k1 分钟

注意基本操作 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln 
1.9k2 分钟

随机化冲过去 感谢unrated *2 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const dou
1.2k1 分钟

维护步数,两张纸条到达的行数 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double e