Submission #1194014
Source Code Expand
#include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define F first #define S second #define fo(i, n) for(int i = 1; i <= n; ++i) #define rep(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, ll> pll; const int N = 200200; const int mod = 1e9 + 7; const ll INF = 1e18; ll n, a[N], ans; int main() { ios::sync_with_stdio(0); cin.tie(0); cin>>n; fo(i,3*n) cin>>a[i]; sort(a+1,a+3*n+1); reverse(a+1,a+3*n+1); for(int i=2;i<=2*n;i+=2) ans+=a[i]; cout<<ans; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | Speedster |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 616 Byte |
Status | RE |
Exec Time | 1339 ms |
Memory | 1792 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 | 6 ms | 764 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 | RE | 1339 ms | 1792 KB |
07.txt | WA | 12 ms | 1792 KB |
08.txt | RE | 119 ms | 1792 KB |
09.txt | RE | 120 ms | 1792 KB |
10.txt | WA | 19 ms | 1792 KB |