摘要:
树状数组#include#include#include#include#includeusing namespace std;const int maxn = 1000000 + 10;vectorTree[50000 + 10];int n;int val[50000 + 10];int c[m... 阅读全文
摘要:
先找出所有的数,排序,然后o(1)效率询问#include#include#include#include#includeusing namespace std;long long Ans[1200000];int tot;mapCun;const long long INF = 1e18;void... 阅读全文
摘要:
先写一个完全背包,然后找规律,然后打表。#include#include#include#includeusing namespace std;int a[2000000 + 100];int Zhong[2000000 + 100];int tot;int MOD = 1000000;int ma... 阅读全文