Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define CHMIN(a,b) a=min((a),(b))
#define CHMAX(a,b) a=max((a),(b))

// mod
const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

// floating
typedef double Real;
const Real EPS = 1e-11;
#define EQ0(x) (abs(x)<EPS)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<Real> P;

int n;
char s[52][52];
int cnt[26];

int main(){
  scanf("%d",&n);
  REP(i,n)scanf("%s",s[i]);
  {
    REP(j,26){
      cnt[j] = count(s[0],s[0]+strlen(s[0]),'a'+j);
    }
  }
  FOR(i,1,n){
    REP(j,26){
      CHMIN(cnt[j],count(s[i],s[i]+strlen(s[i]),'a'+j));
    }
  }
  REP(j,26){
    REP(_,cnt[j])putchar('a'+j);
  }
  puts("");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: no matching function for call to 'min(int&, std::iterator_traits<char*>::difference_type)'
   20 | #define CHMIN(a,b) a=min((a),(b))
      |                      ~~~^~~~~~~~~
a.cc:48:7: note: in expansion of macro 'CHMIN'
   48 |       CHMIN(cnt[j],count(s[i],s[i]+strlen(s[i]),'a'+j));
      |       ^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:20:25: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::iterator_traits<char*>::difference_type' {aka 'long int'})
   20 | #define CHMIN(a,b) a=min((a),(b))
      |                      ~~~^~~~~~~~~
a.cc:48:7: note: in expansion of macro 'CHMIN'
   48 |       CHMIN(cnt[j],count(s[i],s[i]+strlen(s[i]),'a'+j));
      |       ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:20:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 | #define CHMIN(a,b) a=min((a),(b))
      |                      ~~~^~~~~~~~~
a.cc:48:7: note: in expansion of macro 'CHMIN'
   48 |       CHMIN(cnt[j],count(s[i],s[i]+strlen(s[i]),'a'+j));
      |       ^~~~~