
逆序对
Bug原产地
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
codeforces edu96-E. String Reversal (逆序对+思维)
题目链接#include<bits/stdc++.h>#define LL long long#define pii pair<int,int>#define all(x) x.begin(),x.end()#define mem(a, b) memset(a,b,sizeof(a))using namespace std;const int maxn = 2e5 + 5;const int MOD = 1e9 + 7;inline int read() {原创 2020-10-13 16:06:00 · 197 阅读 · 0 评论 -
逆序对
定义: 长度为n的数组,如果有 i < j && a [ i ] > a [ j ],则称 ( i , j )为一对逆序对归并解法:#include<bits/stdc++.h>#define ll long longusing namespace std;const int maxn=1e6+5;int a[maxn],b[maxn...原创 2020-01-17 18:20:58 · 186 阅读 · 0 评论