Submission #1194248


Source Code Expand

#include <bits/stdc++.h>

using namespace std;
typedef  long long ll;
typedef unsigned long long ull;
int inf_int=1e9;
ll inf_ll=1e16;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define pb push_back
const double pi=3.1415926535898;
#define dout if(debug) cout
#define fi first
#define se second
#define sp setprecision
#define siz(a) a.size()
#define EPS 1e-7
#define next asdfafgasgasg
bool debug=0;
typedef long double dbl;
const int MAXN = 2e6;
const int MOD = 1e9 +7;


void solve()
{
    int n;
    cin >> n;
    int n1=n;
    n=3*n;
    vector<int> a;
    for(int i=1;i<=n;++i){
        int x;
        cin >> x;
        a.pb(x);
    }
    sort(a.begin(),a.end());
    ll sum=0;
    int cnt=0;
    for(int i=n1;i<a.size() && cnt<n1;i++){
        sum+=a[i];
        cnt++;
    }
    cout << sum<<"\n";

}


#define FILE "palindrome"
int main()
{
        #ifdef zxc
            freopen("input.txt","r",stdin);
 //          freopen("output.txt","w",stdout);
        #else
         //     freopen(FILE".in","r",stdin);
         //     freopen(FILE".out","w",stdout);
        #endif // zxc

     //  freopen(FILE".in","r",stdin);
     //   freopen(FILE".out","w",stdout);

     //   freopen("input.txt","r",stdin);
       // freopen("output.txt","w",stdout);

       if(!debug)
       {
            ios_base::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
       }

        int t=1;
        while(t--)
           solve();
        return 0;
}

Submission Info

Submission Time
Task A - AtCoder Group Contest
User the_art_of_war
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1550 Byte
Status WA
Exec Time 48 ms
Memory 2420 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 4
WA × 8
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 4 ms 512 KB
06.txt AC 41 ms 2420 KB
07.txt AC 24 ms 2420 KB
08.txt WA 48 ms 2420 KB
09.txt WA 48 ms 2420 KB
10.txt WA 47 ms 2420 KB