- 博客(4)
- 收藏
- 关注
原创 逆序对数量板子
#include<iostream>using namespace std;int b[200005];int c[200005];int a[200005];long long cnt = 0;void merge_sort(int l, int r) { if (r - l > 0)//如果整个区间中元素个数大于1,则继续分割 { int mid = (l + r) / 2; int i = l; //辅助数组的下标
2021-07-27 17:42:12
120
原创 算法二分板子
先发一个正常二分模板的ac代码#include<cstdio>#include<algorithm>#include<iostream>using namespace std;int a[1000020];int findpos(int a[], int l, int r, int k){ if (l == r) { if (a[l] == k) return l; else return -1;/*最后位置的数与待查询数不相等,说.
2021-07-16 19:17:33
188
原创 codeforce#d713(div3)D. Corrupted Array
#include<iostream>#include<algorithm>#include<map>using namespace std;long long b[200005];int main(){ int t; cin>>t; while(t--) { map<long long ,int >q; int n; cin>>n; for(int i=1;i<=n+2;i++) { .
2021-07-15 13:26:36
136
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅