Submission #4265545


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
const int N = 50050;

int n;
int sum;
int a[N];
inline int cmp(int x,int y)
{
	return x<y;
}
int main(){
	cin>>n;
	for ( int i=1;i<=3*n;i++)
	sort ( a+1,a+n+1,cmp);
	for ( int i=1;i<=n;i += 2)
		{
			sum += a[i];
		}
	cout<<sum;
	return 0;
}

Submission Info

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

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 00_example_01.txt, 00_example_02.txt
All 0 / 300 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt
Case Name Status Exec Time Memory
00_example_01.txt 1 ms 256 KB
00_example_02.txt 1 ms 256 KB
01.txt 1 ms 256 KB
02.txt 1 ms 256 KB
03.txt 1 ms 256 KB
04.txt 1 ms 256 KB
05.txt
06.txt
07.txt
08.txt
09.txt
10.txt