Language: C++

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<functional>
#include<vector>
#include<math.h>
using namespace std;

int main(){
  //nCkで求めて重複の数だけ減らす？
  //これじゃTLEか
  //順列で並べ変えて先頭も3つをとる？ これ間違い
  //
  
  
  int N;
  cin>>N;
  string S;
  string T[10000000];
  for(int i=0;i<N-2;i++){
    for(int j=i+1;j<N-1;j++){
      for(int k=j+1;k<N;k++){
        T.push_back(S[i]+S[j]+S[k]);
      }
    }
  }
  sort(T[0],T[10000000]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: request for member 'push_back' in 'T', which is of non-class type 'std::string [10000000]' {aka 'std::__cxx11::basic_string<char> [10000000]'}
   24 |         T.push_back(S[i]+S[j]+S[k]);
      |           ^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __cxx11::basic_string<char>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/14/bits/stl_algo.h:4772:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __cxx11::basic_string<char>]'
 4772 |       std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter());
      |       ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:28:7:   required from here
   28 |   sort(T[0],T[10000000]);
      |   ~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1906:50: error: no match for 'operator-' (operand types are 'std::__cxx11::basic_string<char>' and 'std::__cxx11::basic_string<char>')
 1906 |                                 std::__lg(__last - __first) * 2,
      |                                           ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:1906:50: note:   'std::__cxx11::basic_string<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
 1906 |                                 std::__lg(__last - __first) * 2,
      |                                           ~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:1906:50: note:   'std::__cxx11::basic_string<char>' is not derived from 'const std::move_iterator<_IteratorL>'
 1906 |                                 std::__lg(__last - __first) * 2,
      |                                           ~~~~~~~^~~~~~~~~