Submission #2229968
Source Code Expand
#include "bits/stdc++.h" using namespace std; #define FOR(i,a,b) for(int i =(a);i<(b);i++) #define REP(i,n) for(int i=0;i<(n);i++) #define REPm(i,n) for(int i=(n)-1;i>=0;i--) #define REP1(i,n) for(int i=1;i<=(n);i++) #define MAX_N 100000 typedef long long ll; int main(){ vector<ll> A; int N; cin >> N; REP(i,3*N){ ll input; cin >> input; A.push_back(input); } sort(A.begin(),A.end(),greater<int>()); ll ans = 0; REP(i,N){ ans += A[2*i+1]; } cout << ans << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | yankeiori |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 578 Byte |
Status | AC |
Exec Time | 134 ms |
Memory | 6256 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 | 8 ms | 640 KB |
06.txt | AC | 134 ms | 6256 KB |
07.txt | AC | 53 ms | 5232 KB |
08.txt | AC | 104 ms | 5872 KB |
09.txt | AC | 110 ms | 5616 KB |
10.txt | AC | 105 ms | 4848 KB |