Submission #1368890
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define forn(i, s, f) for(int i = (s); i <= (f); ++i) #define for1(i, f, s) for(int i = (f); i >= (s); --i) #define show(x) cout << #x << " = " << x << " "; #define skip continue; #define pb push_back #define _1 first #define _2 second typedef unsigned long long ll; const int INF = 1e9 + 5; const int N5 = 1e5 + 5; #define int ll ll n, a[4 * N5], ans, y, x; main() { cin >> n; forn (i, 1, n * 3) cin >> a[i]; sort(a + 1, a + (n * 3) + 1); for (int i = 2; i <= n * 3; i += 3) x += a[i]; forn (i, n + 1, n * 2) y += a[i]; cout << max(y, x); }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | Bruteforcer_ |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 678 Byte |
Status | WA |
Exec Time | 130 ms |
Memory | 2560 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 | 7 ms | 384 KB |
06.txt | AC | 130 ms | 2560 KB |
07.txt | AC | 50 ms | 2560 KB |
08.txt | WA | 102 ms | 2560 KB |
09.txt | WA | 102 ms | 2560 KB |
10.txt | WA | 102 ms | 2560 KB |