Submission #1194121


Source Code Expand

Copy
#include <algorithm>

using namespace std;

const int MAXN = 3E5 + 10;

int n;
int a[MAXN];

int main(){
	scanf("%d", &n);
	int n0 = n * 3;
	for (int i = 0; i < n0; ++i)
		scanf("%d", a + i);
	sort(a, a + n0);
	long long ans = 0;
	for (int i = 0; i < n; ++i)
		ans += a[n + (i << 1)];
	printf("%lld\n", ans);
	return 0;
}

Submission Info

Submission Time
Task A - AtCoder Group Contest
User sfiction
Language C++14 (GCC 5.4.1)
Score 0
Code Size 343 Byte
Status

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:11:16: error: ‘scanf’ was not declared in this scope
  scanf("%d", &n);
                ^
./Main.cpp:19:22: error: ‘printf’ was not declared in this scope
  printf("%lld\n", ans);
                      ^