Submission #1194558


Source Code Expand

#include<bits/stdc++.h>
#define RI(x) x = rit()
#define RII(a,b) a = rit(), b = rit()
#define RIII(a,b,c) a = rit(), b = rit(), c = rit()
#define REP(I, N) for(int I=0;I<int(N);I++)
#define REPP(I, N) for(int I=1;I<=int(N);I++)
#define ll long long
#define SZ(x) (int)(x).size()
#define F first
#define S second
inline ll rit(){
    ll f=0,key=1;
    char ch;
    do{
        ch = getchar();
        if(ch=='-') key=-1;;
    }while(ch<'0'||ch>'9');
    do{
        f = f*10+ch-'0';
        ch = getchar();
    }while(ch>='0'&&ch<='9');
    return f*key;
}
using namespace std;
typedef pair<int,int> P;
ll ar[100005];
int main(void){
	ll n;
	RI(n);
	for(int i=0;i<n*3;++i) RI(ar[i]);
	sort(ar,ar+n*3);
	ll ans=0;
	for(ll i=1;i<=n;++i) ans+=ar[3*n-i*2];
	printf("%lld\n",ans);
}

Submission Info

Submission Time
Task A - AtCoder Group Contest
User chenxeney
Language C++14 (GCC 5.4.1)
Score 0
Code Size 810 Byte
Status RE
Exec Time 320 ms
Memory 1024 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 7
RE × 5
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
All 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 AC 1 ms 256 KB
00_example_02.txt AC 1 ms 256 KB
01.txt AC 1 ms 256 KB
02.txt AC 1 ms 256 KB
03.txt AC 1 ms 256 KB
04.txt AC 1 ms 256 KB
05.txt AC 3 ms 384 KB
06.txt RE 320 ms 1024 KB
07.txt RE 96 ms 1024 KB
08.txt RE 100 ms 1024 KB
09.txt RE 99 ms 1024 KB
10.txt RE 99 ms 1024 KB