原题链接 排序+双指针 #include <iostream> #include <algorithm> using namespace std; const int N = 100010; int a[N], b[N]; int main() { int n; cin >> n