Submission #1194006
Source Code Expand
#include <iostream> #include <bitset> #include <vector> #include <cmath> #include <ctime> #include <cassert> #include <cstdio> #include <queue> #include <set> #include <map> #include <fstream> #include <cstdlib> #include <string> #include <cstring> #include <algorithm> #include <numeric> #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++i) #define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i) #define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i) using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpi; typedef vector<vi> vvi; typedef long long i64; typedef vector<i64> vi64; typedef vector<vi64> vvi64; template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; } template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; } int main() { int n; cin >> n; vi64 a(3 * n); forn(i, 3 * n) cin >> a[i]; sort(rall(a)); i64 ans = 0; forn(i, n) ans += a[2 * i + 1]; cout << ans << '\n'; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | endagorion |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 1304 Byte |
Status | AC |
Exec Time | 131 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 | 131 ms | 2560 KB |
07.txt | AC | 51 ms | 2560 KB |
08.txt | AC | 103 ms | 2560 KB |
09.txt | AC | 103 ms | 2560 KB |
10.txt | AC | 103 ms | 2560 KB |