Submission #1194030


Source Code Expand

Copy
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;

typedef long long int lli;

int main(void)
{
	lli n;
	scanf("%lld", &n);
	lli a[3*n];
	for(lli i = 0;i < 3*n;i++) scanf("%lld", &a[i]);
	sort(a, a+3*n);
	lli res = 0;
	for(lli i = n;i < 2*n;i++) res += a[i];
	printf("%lld\n", res);
}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:14:15: error: ‘sort’ was not declared in this scope
  sort(a, a+3*n);
               ^
./Main.cpp:11:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld", &n);
                   ^
./Main.cpp:13:49: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  for(lli i = 0;i < 3*n;i++) scanf("%lld", &a[i]);
                                                 ^