摘要:
贪心,每次如果够直接卖,不够找到之前的卖出的最多的一份,然后反悔不过反悔的确是很好的策略!#include#include#include#include#include#include#define N 250005using namespace std;prior... 阅读全文
摘要:
莫队+树状数组#include#include#include#include#include#define N 100055#define M 1000066using namespace std;int gy[N],be[N],c[M],cc[M],n,m,nn,... 阅读全文
摘要:
求逆序对个数,莫队套树状数组#include#include#include#include#include#define N 50005using namespace std;int n,m,nn,a[N],c[5000005],be[N],maxn;struct ... 阅读全文
摘要:
带修改莫队,每次查询前调整修改#include#include#include#include#include#define N 20005using namespace std;int n,m,nn,a[N],be[N],l,r,num[1000005],tot,q... 阅读全文