贴一下第一题和第四题的代码吧,第一题AC,第四题暴力,过了71%;第二题第三题没啥思路。 第一题 #include<bits/stdc++.h> using namespace std; /* 2 6 3 7 1 4 1 2 3 7 3 6 3 2 5 1 1 1 1 1 1 2 1 3 1 */ bool go(const vector<int>& array1, const vector<int>& array2, const int& n) { vector<int> diff(n); ...