Submission #1369007


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;

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);
    forn (i, n + 1, n * 2)
        y += a[i];
    for (int i = 2; i <= n * 3; i += 3)
        x += a[i];
    forn (i, 1, n * 3)
        cout << a[i] << " ";
    cout << "\n";
    cout << max(x, y);
}

Submission Info

Submission Time
Task A - AtCoder Group Contest
User Bruteforcer_
Language C++14 (GCC 5.4.1)
Score 0
Code Size 733 Byte
Status WA
Exec Time 157 ms
Memory 5760 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
WA × 2
WA × 12
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 WA 1 ms 256 KB
00_example_02.txt WA 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 9 ms 512 KB
06.txt WA 157 ms 5760 KB
07.txt WA 72 ms 3200 KB
08.txt WA 126 ms 4352 KB
09.txt WA 126 ms 4352 KB
10.txt WA 126 ms 4352 KB