![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
2019湘潭邀请赛
撒旦即可
研究CV的菜狗
展开
-
Build Tree
#include <bits/stdc++.h> #define ll long long using namespace std; ll s[200010]; int nm[200010]; ll sum[200010]; ll n,m,p; ll multpow(ll a,ll b) { ll ans=0,tp=a; while(b) { ...原创 2019-05-24 23:31:45 · 445 阅读 · 0 评论 -
2019湘潭邀请赛 Chika and Friendly Pairs(莫队+树状数组)
解题思路:莫队的复杂度O(mlogn),然后更新,查询树状数组的复杂度O(logn),最终复杂度O(mlog^2n) #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #define N 27005 using namespace std; struct ...原创 2019-05-22 22:35:51 · 262 阅读 · 0 评论