其实对于数组的顺序打乱并不会影响,因为都是要求对所有i,j分别匹配求出能满足条件的解的个数,所以排序加二分即可。 include include include include include<memory.h> include include define pii pair<int,int> define FAST ios::sync_with_stdio(false),cin.tie(0),cout.tie(0) using namespace std;typedef long long ll;const int Max = 2e5 + 5;int lst[Max]...