记录一下一开始没想通的地方 关键在于分清几种情况: n == 2且两数相等 输出"0 0"//特判 mx >= tot - mx 最后剩下的只能是最大值 mx < tot - mx tot为偶数且a[i] == 1时不能是最后剩下的那个//关键  #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; void solve() { int n; cin >> n; vector<int> a(n); LL tot = 0...