#include <bits/stdc++.h>
#define FI(i,a,b) for(int i=(a);i<=(b);i++)
#define FD(i,a,b) for(int i=(a);i>=(b);i--)
#define LL long long
#define Ldouble long double
#define PI 3.1415926535897932384626
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define mp make_pair
#define fi first
#define se second
using namespace std;
int n, s[300003];
LL ans;
int main(){
scanf("%d", &n);
FI(i, 1, n + n + n) scanf("%d", &s[i]);
sort(s + 1, s + n + n + n + 1);
FI(i, n + 1, n + n + n){
ans += s[i];
i++;
}
printf("%lld\n", ans);
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:22:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
./Main.cpp:23:40: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
FI(i, 1, n + n + n) scanf("%d", &s[i]);
^