// In the name of God
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#include <complex>
using namespace std;
#define rep(i, a, b) for (int i = (a), i##_end_ = (b); i < i##_end_; ++i)
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define mp make_pair
#define x first
#define y second
#define pb push_back
#define SZ(x) (int((x).size()))
#define ALL(x) (x).begin(), (x).end()
template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }
template<typename T> inline bool smin(T &a, const T &b) { return a > b ? a = b : a; }
template<typename T> inline bool smax(T &a, const T &b) { return a < b ? a = b : a; }
typedef long long LL;
const int N = (int) 1e6 + 6, mod = (int) 0;
int a[N];
int main() {
int n;
scanf("%d", &n);
long long res = 0;
for (int j = 0; j < 3 * n; ++j)
scanf("%d", a + j);
sort(a, a + 3 * n);
for (int j = n; j < 3 * n; j += 2)
res += a[j];
cout << res << endl;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:43:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
./Main.cpp:46:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", a + j);
^