摘要:
#include<bits/stdc++.h> #define ll long long using namespace std; const ll mod = 1e9+7; const ll maxn = 1e5+10; ll n,m,k; ll ans[maxn],cnt[maxn],res=0 阅读全文
摘要:
经典莫队 解释一下 2x-len x为超限的个数, len-x为好的个数 好块能容纳的个数为 len-x+1 剩下不能容纳的超限数的个数为x-(len-x+1) 单独划走一个是最优秀的 再加上 好的那块 就是2*x-len #include<bits/stdc++.h> #define ll lon 阅读全文