Submission #1194568
Source Code Expand
#include "bits/stdc++.h" #define MOD 1000000007 #define INF 11234567890 #define in std::cin #define out std::cout #define rep(i,N) for(LL i=0;i<N;++i) typedef long long int LL; LL N, a[312345]; LL ans; int main() { in >> N; rep(i, 3*N) { in >> a[i]; } int cou = 0; std::sort(a, a + 3 * N,std::greater<LL>()); for (int i = 1; i < 3 * N; i += 2) { if (cou == N) { break; } ans += a[i]; ++cou; } out << ans << std::endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | Bwambocos |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 475 Byte |
Status | AC |
Exec Time | 130 ms |
Memory | 2560 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 7 ms | 384 KB |
06.txt | AC | 130 ms | 2560 KB |
07.txt | AC | 50 ms | 2560 KB |
08.txt | AC | 101 ms | 2560 KB |
09.txt | AC | 101 ms | 2560 KB |
10.txt | AC | 101 ms | 2560 KB |