Submission #1194566


Source Code Expand

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define _abs(x)((x) < 0 ? (x) * -1 : (x))

int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    //freopen("debug.txt", "w", stderr);

    cin.tie(0);
    ios::sync_with_stdio(false);

    ll n;

    cin >> n;

    vector<ll> a(n * 3);
    vector<vector<ll> > teams(n);
    ll ans = 0;

    ll i, j, k, len = n * 3;

    for (i = 0; i < len; i++) cin >> a[i];

    sort(a.begin(), a.end(), std::greater<ll>());

    k = 0;
    for (i = 0; i < len; i += 3) {
        for (j = 0; j < n; j++) {
            teams[j].push_back(a[k++]);
        }
    }

    for (i = 0; i < n; i++) ans += teams[i][1];

    cout << ans << endl;

    return 0;
}

Submission Info

Submission Time
Task A - AtCoder Group Contest
User ishibashijun
Language C++14 (GCC 5.4.1)
Score 0
Code Size 794 Byte
Status RE
Exec Time 155 ms
Memory 11392 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 2
WA × 4
RE × 6
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 RE 98 ms 896 KB
06.txt RE 153 ms 11392 KB
07.txt RE 132 ms 10752 KB
08.txt RE 155 ms 10752 KB
09.txt RE 155 ms 10752 KB
10.txt RE 154 ms 10752 KB