/*
*@author: percation
*#time:2021.04.20
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
ll n;
ll ans;
ll a[N];
ll n1,n2;
ll sum1,sum2;
int main(){
cin >> n;
for(int i = 0; i < n; i++)
cin >> a[i];
sort(a,a + n);
int mid = 0;
mid = n / 2;
for(int i = 0; i < mid; i++){
sum1 += a[i];
n1++;
}
for(int i = mid; i < n; i++){
sum2 += a[i];
n2++;
}
cout << "Outgoing #: " << n2 << endl;
cout << "Introverted #: " << n1 << endl;
// cout <<"-----------" << endl;//两种方式皆可
// cout << "Outgoing #: " << n - mid <<endl;
// cout << "Introverted #: " << mid << endl;
cout << "Diff = " << sum2 - sum1 << endl;
return 0;
}
L2-017 人以群分 (25 point(s))
最新推荐文章于 2022-04-22 15:48:21 发布