题目地址 L2-017 人以群分 (25 分)

这题也太水了把,这也有25分嘛吐槽下....
#include <bits/stdc++.h>
using namespace std;
int n, num[100010], diff;
int main() {
	cin>>n;
	for(int i = 0; i < n; i++) 
		cin>>num[i];
	sort(num,num+n);
	for(int i = 0; i < n/2; i++)
		diff-=num[i];
	for(int i = n/2; i < n; i++)
		diff+=num[i];
	printf("Outgoing #: %d\n",n%2 ? n/2+1 : n/2);
	printf("Introverted #: %d\n",n/2);
	printf("Diff = %d\n",diff);
	return 0;
}