贪心: 先将所有数选出最小和最大的5个数,再按绝对值大小枚举选数字 #include <iostream> #include <algorithm> using namespace std; typedef long long LL; const int N = 100010; int n; int a[N],b[N]; int main () { int T; cin >> T; while (T--) { cin >> n; for (in
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有