#include <iostream> #include <vector> using namespace std; int main() { int n; while (cin >> n) { // 输入的数组 int tmp; vector<int> nums; for (int i = 0; i < n; ++i) { cin >> tmp; nums.push_back(tmp); ...