这套题,注意数据范围较大的情况,要用 long long 。。。 第一题:求绝对值最小,循环一遍判断即可,签到题, (AC) 参考代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; int T,n,m,sum,ans; int main() { //freopen("in.txt","r",stdin); cin >> n; vector<LL> num(n+1); for(i...