Submission #1590829
Source Code Expand
#include<iostream> #include<iomanip> #include<math.h> #include<vector> #include<algorithm> #include<set> #include<map> #include<queue> #include<stack> #include<string> #define INF 1000000000ll #define MOD 1000000007ll #define EPS 1e-8 #define REP(i,m) for(long long i=0; i<m; ++i) #define FOR(i,n,m) for(long long i=n; i<m; ++i) #define DUMP(n,a) for(long long i=0; i<n; ++i) { cout<<a[i]; if(i!=n-1) cout<<" "; else cout<<endl; } #define ALL(v) v.begin(),v.end() #define pb push_back using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef long double ld; typedef vector<int> vi; typedef vector<vector<int> > vii; typedef vector<long long> vl; typedef vector<vector<long long> > vll; typedef vector<P> vp; typedef vector<vector<P> > vpp; int main() { ios::sync_with_stdio(false); int n; cin>>n; vector<ll> a(3*n); REP(i,3*n) cin>>a[i]; sort(ALL(a)); ll res=0; REP(i,n) { res+=a[3*n-2-2*i]; } cout<<res<<endl; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | vjudge5 |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 943 Byte |
Status | AC |
Exec Time | 47 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 | 4 ms | 384 KB |
06.txt | AC | 38 ms | 2560 KB |
07.txt | AC | 23 ms | 2560 KB |
08.txt | AC | 47 ms | 2560 KB |
09.txt | AC | 47 ms | 2560 KB |
10.txt | AC | 46 ms | 2560 KB |