Language: C++

#include <bits/stdc++.h>
using namespace std;
static const int MAXN = 3 * 1e5 + 10;
typedef __int64 LL;
int n;
int data[MAXN] = {0};
int main()
{
    scanf("%d" , &n);
    n *= 3;
    for(int i = 0 ; i < n ; ++i)
        scanf("%d" , data + i);
    sort(data , data + n);
    int l = 0 , r = n - 2;
    LL ans = 0;
    int pos = 0;
    n /= 3;
    while(pos < n)
    {
        ans += data[r];
        r -= 2;
        ++pos;
    }
    printf("%I64d" , ans);
}


Compiler output:
a.cc:4:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | typedef __int64 LL;
      |         ^~~~~~~
      |         __int64_t
a.cc: In function 'int main()':
a.cc:12:22: error: reference to 'data' is ambiguous
   12 |         scanf("%d" , data + i);
      |                      ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:5: note:                 'int data [300010]'
    6 | int data[MAXN] = {0};
      |     ^~~~
a.cc:13:10: error: reference to 'data' is ambiguous
   13 |     sort(data , data + n);
      |          ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:5: note:                 'int data [300010]'
    6 | int data[MAXN] = {0};
      |     ^~~~
a.cc:13:17: error: reference to 'data' is ambiguous
   13 |     sort(data , data + n);
      |                 ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:5: note:                 'int data [300010]'
    6 | int data[MAXN] = {0};
      |     ^~~~
a.cc:15:5: error: 'LL' was not declared in this scope
   15 |     LL ans = 0;
      |     ^~
a.cc:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |         ans += data[r];
      |         ^~~
      |         abs
a.cc:20:16: error: reference to 'data' is ambiguous
   20 |         ans += data[r];
      |                ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:5: note:                 'int data [300010]'
    6 | int data[MAXN] = {0};
      |     ^~~~
a.cc:24:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |     printf("%I64d" , ans);
      |                      ^~~
      |                      abs