MASTER OF GCD(树状数组差分|线段树)

    嗯。反正这道题当时忘记了树状数组差分。用的线段树。比赛时写这么长的线段树时间上多少有点吃亏。 就是两个树,维护区间加1操作,然后分别查两棵树的最小值。 树状数组差分: #include<bits/stdc++.h> using namespace std; const int maxn=100000+100; const int mod=998244353; const int inf=0
相关文章
相关标签/搜索