Language: C++

#include<bits/stdc++.h>
int main() {
  vector<int> cnt[256];
  vector<char> alp(26);
  iota(alp.begin(), alp.end(), 'a');
  int n; cin >> n;
  for (int i = 0; i < n; i++) {
    string s; cin >> s;
    for (char c : alp) {
      cnt[c].push_back(count(s.begin(), s.end(), c));
    }
  }
  for (char c : alp) {
    cout << string(*min_elements(cnt[c].begin(), cnt[c].end()), c);
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'vector' was not declared in this scope
    3 |   vector<int> cnt[256];
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:3:10: error: expected primary-expression before 'int'
    3 |   vector<int> cnt[256];
      |          ^~~
a.cc:4:10: error: expected primary-expression before 'char'
    4 |   vector<char> alp(26);
      |          ^~~~
a.cc:5:8: error: 'alp' was not declared in this scope
    5 |   iota(alp.begin(), alp.end(), 'a');
      |        ^~~
a.cc:5:3: error: 'iota' was not declared in this scope; did you mean 'std::iota'?
    5 |   iota(alp.begin(), alp.end(), 'a');
      |   ^~~~
      |   std::iota
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58:
/usr/include/c++/14/bits/stl_numeric.h:88:5: note: 'std::iota' declared here
   88 |     iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
      |     ^~~~
a.cc:6:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   int n; cin >> n;
      |          ^~~
      |          std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string s; cin >> s;
      |     ^~~~~~
a.cc:8:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:22: error: 's' was not declared in this scope
    8 |     string s; cin >> s;
      |                      ^
a.cc:10:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   10 |       cnt[c].push_back(count(s.begin(), s.end(), c));
      |       ^~~
      |       int
a.cc:10:24: error: 'count' was not declared in this scope; did you mean 'std::count'?
   10 |       cnt[c].push_back(count(s.begin(), s.end(), c));
      |                        ^~~~~
      |                        std::count
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout << string(*min_elements(cnt[c].begin(), cnt[c].end()), c);
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:34: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |     cout << string(*min_elements(cnt[c].begin(), cnt[c].end()), c);
      |                                  ^~~
      |                                  int
a.cc:14:21: error: 'min_elements' was not declared in this scope
   14 |     cout << string(*min_elements(cnt[c].begin(), cnt[c].end()), c);
      |                     ^~~~~~~~~~~~
a.cc:14:13: error: 'string' was not declared in this scope
   14 |     cout << string(*min_elements(cnt[c].begin(), cnt[c].end()), c);
      |             ^~~~~~
a.cc:14:13: note: suggested alternatives:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~