Submission #2229965
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()); 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 | 0 |
Code Size | 565 Byte |
Status | WA |
Exec Time | 134 ms |
Memory | 6384 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 1 ms | 256 KB |
02.txt | WA | 1 ms | 256 KB |
03.txt | WA | 1 ms | 256 KB |
04.txt | WA | 1 ms | 256 KB |
05.txt | WA | 8 ms | 640 KB |
06.txt | AC | 134 ms | 5616 KB |
07.txt | AC | 54 ms | 6256 KB |
08.txt | WA | 105 ms | 6128 KB |
09.txt | WA | 105 ms | 5488 KB |
10.txt | WA | 105 ms | 6384 KB |