criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <string>
#include <iomanip>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
  int N;
  cin >> N;

  vector<string>word(N);
  for(int i=0;i<N;i++){
    cin >> word[i];
  }

  vector<vector<int> >check(N,vector<int>(26,0));
  for(int i=0;i<N;i++){
    int n = word[i].length();
    for(int j=0;j<n;j++){
      check[i][word[j] - 'a']++;
    }
  }

  vector<int>usable(26,0);

  for(int i=0;i<26;i++){
    int min_al = 51;
    for(int j=0;j<N;j++){
      if(check[j][i] < min_al)
        min_al = check[j][i];
    }
    usable[i] = min_al;
  }

  for(int i=0;i<26;i++){
    if(usable[i] == 0)
      continue;
    else{
      for(int j=0;j<usable[i];j++){
        cout << (char) i + 'a';
      }
    }
  }

  cout << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: no match for 'operator-' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   20 |       check[i][word[j] - 'a']++;
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:1:
/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:
a.cc:20:26: note:   '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   20 |       check[i][word[j] - 'a']++;
      |                          ^~~
/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:
a.cc:20:26: note:   '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   20 |       check[i][word[j] - 'a']++;
      |                          ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,b) for(ll i=0;i<b;i++)
using namespace std;
string s[50];
int n,m;
signed main() {
    cin>>n;
    rep(i,n)cin>>s[i];
    rep(j,26) {
        m = 100;
        rep(i, n)m = min(m, (int) count(begin(s[i]), end(s[i]),(char)j+97));
        rep(i, m) cout <<(char)(j+97);
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:22: error: 'll' was not declared in this scope
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                      ^~
a.cc:8:5: note: in expansion of macro 'rep'
    8 |     rep(i,n)cin>>s[i];
      |     ^~~
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i,n)cin>>s[i];
      |         ^
a.cc:2:29: note: in definition of macro 'rep'
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                             ^
a.cc:2:22: error: 'll' was not declared in this scope
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                      ^~
a.cc:9:5: note: in expansion of macro 'rep'
    9 |     rep(j,26) {
      |     ^~~
a.cc:9:9: error: 'j' was not declared in this scope
    9 |     rep(j,26) {
      |         ^
a.cc:2:29: note: in definition of macro 'rep'
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                             ^
a.cc:11:13: error: expected ';' before 'i'
   11 |         rep(i, n)m = min(m, (int) count(begin(s[i]), end(s[i]),(char)j+97));
      |             ^
a.cc:2:25: note: in definition of macro 'rep'
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                         ^
a.cc:11:13: error: 'i' was not declared in this scope
   11 |         rep(i, n)m = min(m, (int) count(begin(s[i]), end(s[i]),(char)j+97));
      |             ^
a.cc:2:29: note: in definition of macro 'rep'
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                             ^
a.cc:12:13: error: expected ';' before 'i'
   12 |         rep(i, m) cout <<(char)(j+97);
      |             ^
a.cc:2:25: note: in definition of macro 'rep'
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                         ^
a.cc:12:13: error: 'i' was not declared in this scope
   12 |         rep(i, m) cout <<(char)(j+97);
      |             ^
a.cc:2:29: note: in definition of macro 'rep'
    2 | #define rep(i,b) for(ll i=0;i<b;i++)
      |                             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n;
  vector<int> a(26,50);
  vector<int> b(26,0);
  for(int i=0; i<n; i++) {
    cin >> s;
    for(int j=0; j<s.size(); j++) {
      b[s[j]-'a']++;
    }
    for(int j=0; j<26; j++) {
      a[j]=min(a[j],b[j]);
      b[j]=0;
    }
  }
  char c;
  for(int i=0; i<26; i++) {
    c='a'+i;
    for(int j=0; j<a[i]; j++) {
      cout << c;
    }
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> a(26,50);
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include<cmath>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> a(26,50);
      |          ^~~
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> b(26,0);
      |          ^~~
a.cc:14:7: error: 'b' was not declared in this scope
   14 |       b[s[j]-'a']++;
      |       ^
a.cc:17:7: error: 'a' was not declared in this scope
   17 |       a[j]=min(a[j],b[j]);
      |       ^
a.cc:17:21: error: 'b' was not declared in this scope
   17 |       a[j]=min(a[j],b[j]);
      |                     ^
a.cc:24:20: error: 'a' was not declared in this scope
   24 |     for(int j=0; j<a[i]; j++) {
      |                    ^
Language: C++

#include <bits/stdc++.h>

#define ld long double
#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vl vector<ll>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)
#define ALL(v) v.begin(), v.end()
#define INF 1e9

#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)

using namespace std;

/**
 * calculate GCD(greatest common divisor)
 * @param a
 * @param b
 * @return
 */
unsigned euclidean_gcd(unsigned a, unsigned b) {
    if (a < b) return euclidean_gcd(b, a);
    unsigned r;
    while ((r = a % b)) {
        a = b;
        b = r;
    }
    return b;
}

/**
 * output answer
 * @tparam T
 * @param answer
 * @return
 */
template<typename T>
T output(T answer) {
    cout << answer << endl;
    return 0;
}

/** ----from here ---------------------------------------------------------- */

int main() {

    int N;
    cin >> N;
    int i;
    vector <string> a(N);
    rep(i, N) { cin >> a[i]; }
//    vector<int> f(26, 0);
    vector <vector<int> > f(N, vector<int>(26, 0));
    vector <vector<int> > b(N, vector<int>(26, 0));
    vector<int> c(26, 0);

    for (int i = 0; i < N; ++i) {
        string s = a[i];
        for (int j = 0; j < s.length(); ++j) {

            b[i][s[j] - 'a']++;
            if (f[i][s[j] - 'a'] == 0) {
                f[i][s[j] - 'a'] = 1;
            }
        }

    }

    for (int j = 0; j < 26; ++j) {
        int maxTemp = -1
        for (int i = 0; i < N; ++i) {
            int temp = b[i][j];
            if (maxTemp == -1) {
                maxTemp = temp;
            }
            if (temp < maxTemp) {
                maxTemp = temp;
            }
        }
        if (maxTemp > 0) {
            c[j] = maxTemp;
        }
    }

    for (int i = 0; i < 26; ++i) {
        if (c[i] > 0) {
            for (int j = 0; j < c[i]; ++j) {
                char temp = i + 'a';
                cout << temp;
            }
        }
    }
    cout << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:76:9: error: expected ',' or ';' before 'for'
   76 |         for (int i = 0; i < N; ++i) {
      |         ^~~
a.cc:76:35: error: expected ';' before ')' token
   76 |         for (int i = 0; i < N; ++i) {
      |                                   ^
      |                                   ;
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
 int a;
  cin>>a;
  char f;
vector<string>c(a);
vector<int>d(26);
  vector<int>e(26);
    for(int i=0;i<26;i++){
    d[i]=1000;
  }
  for(int i=0;i<a;i++){
    cin>>c[i];
  }
  for(int i=0;i<a;i++){
    for(int j=0;j<c[i].size();j++){
      for(int u=0;u<26;u++){
        if(c[i][j]-'a'==u){
          e[u]++;
        }
      } 
    }
     for(int j=0;j<26;j++){
       d[j]=min(d[j],e[j]);
       e[j]=0;
     }
  }
}
  for(int i=0;i<26;i++){
    f='a'+i
    for(int j=0;j<100000;j++){
    if(d[i]!=0){
       cout<<f<<endl;
    d[i]--;
    }
      else{
        break;
      }
    }
  }
cout<<endl;
      
}


Compiler output:
a.cc:31:3: error: expected unqualified-id before 'for'
   31 |   for(int i=0;i<26;i++){
      |   ^~~
a.cc:31:15: error: 'i' does not name a type
   31 |   for(int i=0;i<26;i++){
      |               ^
a.cc:31:20: error: 'i' does not name a type
   31 |   for(int i=0;i<26;i++){
      |                    ^
a.cc:43:1: error: 'cout' does not name a type
   43 | cout<<endl;
      | ^~~~
a.cc:45:1: error: expected declaration before '}' token
   45 | }
      | ^
Language: C++


#include<bits/stdc++.h>

using namespace std;

 

char h[1000][1000]；//第一个方括号记录第i个字符串，第二个方括号记录第i个字符串的第j个字符。

int s[1000],ans1[1000],ans2[1000];

 

int main(){

	int n,flag = 0;

	scanf("%d",&n);

	for(int i = 1;i <= n;i++){

		scanf("%s",h[i]);//这里字符串的输入要注意一下

		s[i] = strlen(h[i]);

	}

	for(int i = 49;i <=74;i++){

		ans2[i] = 10000000;//初始化

	}

	for(int i = 1;i <= n;i++){

		for(int j = 0;j < s[i];j++){

	    	ans1[h[i][j] - '0']++;

		}

		for(int k = 49;k <= 74;k++){

			ans2[k] = min(ans1[k],ans2[k]);

		}

		memset(ans1,0,sizeof(ans1));

	}

	char p;

	for(int i = 49;i <= 74;i++){

		if(ans2[i] != 0){

			for(int j = 1;j <= ans2[i];j++){

				flag = 1;

				printf("%c",i + '0');

			}

		}

	}

	if(flag == 0) printf("\n");

}




Compiler output:
a.cc:8:19: error: expected initializer before '\U0000ff1b'
    8 | char h[1000][1000]；//第一个方括号记录第i个字符串，第二个方括号记录第i个字符串的第j个字符。
      |                   ^~
a.cc: In function 'int main()':
a.cc:22:28: error: 'h' was not declared in this scope
   22 |                 scanf("%s",h[i]);//这里字符串的输入要注意一下
      |                            ^
a.cc:24:17: error: 's' was not declared in this scope
   24 |                 s[i] = strlen(h[i]);
      |                 ^
a.cc:30:17: error: 'ans2' was not declared in this scope
   30 |                 ans2[i] = 10000000;//初始化
      |                 ^~~~
a.cc:36:35: error: 's' was not declared in this scope
   36 |                 for(int j = 0;j < s[i];j++){
      |                                   ^
a.cc:38:17: error: 'ans1' was not declared in this scope
   38 |                 ans1[h[i][j] - '0']++;
      |                 ^~~~
a.cc:38:22: error: 'h' was not declared in this scope
   38 |                 ans1[h[i][j] - '0']++;
      |                      ^
a.cc:44:25: error: 'ans2' was not declared in this scope
   44 |                         ans2[k] = min(ans1[k],ans2[k]);
      |                         ^~~~
a.cc:44:39: error: 'ans1' was not declared in this scope
   44 |                         ans2[k] = min(ans1[k],ans2[k]);
      |                                       ^~~~
a.cc:48:24: error: 'ans1' was not declared in this scope
   48 |                 memset(ans1,0,sizeof(ans1));
      |                        ^~~~
a.cc:56:20: error: 'ans2' was not declared in this scope
   56 |                 if(ans2[i] != 0){
      |                    ^~~~
Language: C++

#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  cin >> n;
  int a[26];
  int b[26];
  for(int i = 0; i < 26; i++){
      a[i] = INF;
      b[i] = 0;
  }
  for(int i = 0; i < n; i++){
      string s;
      cin >> s;
      for(int i = 0; i < s.size(); i++){
          b[s[i] - 'a']++;
      }
      for(int i = 0; i < 26; i++){
          a[i] = min(a[i],b[i]);
      }
      for(int i = 0; i < 26; i++){
          b[i] = 0;
      }
  }
  for(int i = 0; i < 26; i++){
      for(int j = 0; j < a[i]; j++){
          cout << static_cast<char>('a' + i);
      }
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: 'INF' was not declared in this scope
   27 |       a[i] = INF;
      |              ^~~
Language: C++

#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
#include <string>
#include <tuple>
#include <set>
#include <map>
#include <complex>
#include <iomanip>
#include <cmath>
using namespace std;
typedef long long ll;

int main()
{
  int n;
  cin >> n;
  string s[n];
  for (int i = 0; i < n; i++) cin >> s[i];
  int cnt[s[0].size()];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < s[0].size(); i++) {
    for (int j = 1; j < n; j++) {
      for (int k = 0; k < s[j].size(); k++) {
        if (s[0][i] == s[j][k]) {
          cnt[i]++;
          break;
        }
      }
    }
  }
  string ans = "";
  for (int i = 0; i < s[0].size(); i++) {
    if (cnt[i] == n - 1) ans += s[0][i];
  }
  sort(ans.begin(), ans.end());
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'memset' was not declared in this scope
   22 |   memset(cnt, 0, sizeof(cnt));
      |   ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include <cmath>
  +++ |+#include <cstring>
   12 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;

    string S;
    vector<int> counter(26, INT_MAX);
    for (int i = 0; i < n; i++)
    {
        cin >> S;
        for (int j = 0; j < 26; j++)
        {
            counter[j] = min(counter[j], count(S.begin(), S.end(), 'a' + j));
        }
    }

    string ans = "";
    for (int i = 0; i < 26; i++)
    {
        for (int j = 0; j < counter[i]; j++)
        {
            ans.push_back('a' + i);
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)'
   16 |             counter[j] = min(counter[j], count(S.begin(), S.end(), '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:16:29: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type' {aka 'long int'})
   16 |             counter[j] = min(counter[j], count(S.begin(), S.end(), '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:16:29: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   16 |             counter[j] = min(counter[j], count(S.begin(), S.end(), 'a' + j));
      |                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include "bits/stdc++.h"

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)

typedef long long LL;
typedef unsigned long UL;

using namespace std;


int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;

	string s;
	vector<int> abc('z' - 'a' + 1, INT_MAX);

	REP(i, n)
	{
		cin >> s;
		
		for (char j = 'a'; j <= 'z'; ++j)
		{
			abc[j - 'a'] = min(count(s.begin(), s.end(), j), abc[j - 'a']);
		}
	}

	for (char i = 'a'; i <= 'z'; ++i)
	{
		REP(j, abc[i - 'a'])
		{
			cout << i;
		}
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:43: error: no matching function for call to 'min(std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   29 |                         abc[j - 'a'] = min(count(s.begin(), s.end(), j), abc[j - 'a']);
      |                                        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:29:43: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   29 |                         abc[j - 'a'] = min(count(s.begin(), s.end(), j), abc[j - 'a']);
      |                                        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:29:43: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   29 |                         abc[j - 'a'] = min(count(s.begin(), s.end(), j), abc[j - 'a']);
      |                                        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define MOD (1000000007)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1}; // 移動方向

int n;
vector<string> s;

void input(){
    cin >> n;
    s.resize(n);
    for(int i=0;i<n;i++) cin >> s[i];
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    input();
    char az[26] = "abcdefghijklmnopqrstuwxyz";
    int cnt[26];
    for(int i=0;i<26;i++){
        int rec = INF;
        int tmp;
        for(int j=0;j<n;j++){
            tmp = count(s[j].begin(), s[j].end(), az);
            rec = min(rec, tmp);
        }
        cnt[i] = rec;
    }
    
    for(int i=0;i<26;i++){
        for(int j=0;j<cnt[i];j++){
            cout << az[i];
        }
    }
    cout << endl;
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
                 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/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_equals_val<_Value>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; _Value = const char [26]]':
/usr/include/c++/14/bits/stl_algobase.h:2163:12:   required from 'typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::__count_if(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Predicate = __gnu_cxx::__ops::_Iter_equals_val<const char [26]>; typename iterator_traits< <template-parameter-1-1> >::difference_type = long int]'
 2163 |         if (__pred(__first))
      |             ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4033:29:   required from 'typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&) [with _IIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Tp = char [26]; typename iterator_traits< <template-parameter-1-1> >::difference_type = long int]'
 4033 |       return std::__count_if(__first, __last,
      |              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
 4034 |                              __gnu_cxx::__ops::__iter_equals_val(__value));
      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:34:24:   required from here
   34 |             tmp = count(s[j].begin(), s[j].end(), az);
      |                   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:270:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  270 |         { return *__it == _M_value; }
      |                  ~~~~~~^~~~~~~~~~~
Language: C++

#include <vector>
#include <iostream>
#include <cmath>
#include <numeric>
#include <cstring>
#include <algorithm>
using namespace std;

int main(){
    int n,a[26];
    char c[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
    cin >> n;
    vector<string>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    for(int i=0;i<26;i++){
        int b=51;
        for(int j=0;j<n;j++){
            b=min(b,count(s[j].begin(),s[j].end(),c[i]));
        }
        a[i]=b;
    }
    for(int i=0;i<26;i++){
        for(int j=0;j<a[i];j++){
            cout<<c[i];
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)'
   20 |             b=min(b,count(s[j].begin(),s[j].end(),c[i]));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
                 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:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type' {aka 'long int'})
   20 |             b=min(b,count(s[j].begin(),s[j].end(),c[i]));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:6:
/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:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |             b=min(b,count(s[j].begin(),s[j].end(),c[i]));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i=0;i<n;i++)

int main(){

  int n,memo[100][100]={0},mini=100,v,memo2[100];
  string s[100],ans;
  cin >> n;
  FOR(i,n){
    cin >> s[i];
  }
  FOR(i,n){
    FOR(j,s[i].size()){
      memo[i][s[i].at(j)-'`']++;
    }
  }
  FOR(i,23){
    FOR(j,n){
      v=memo[j][i];
      if(mini>v){
        mini=v;
      }
    }
    memo2[i]=mini;
    mini=100;
  }
  FOR(int i=1;i<24;i++){
    FOR(j,memo2[i]){
      ans+=('`'+i-1);
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:28:23: error: macro "FOR" requires 2 arguments, but only 1 given
   28 |   FOR(int i=1;i<24;i++){
      |                       ^
a.cc:3:9: note: macro "FOR" defined here
    3 | #define FOR(i,n) for(int i=0;i<n;i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:28:3: error: 'FOR' was not declared in this scope
   28 |   FOR(int i=1;i<24;i++){
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for(int i=0;i<n;i++)

int main(){

  int n,memo[100][100]={0},mini=100,v;
  string s[100],ans;
  cin >> n;
  FOR(i,n){
    cin >> s[i];
  }
  FOR(i,n){
    FOR(j,s[i].size()){
      memo[i][s[i].at(j)-'`']++;
    }
  }
  FOR(i,23){
    FOR(j,n){
      v=memo[j][i];
      if(mini>v){
        mini=v;
      }
    }
    memo2[i]=mini;
    mini=100;
  }
  FOR(i,23){
    FOR(j,memo2[i]){
      ans+=('a'+i);
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'memo2' was not declared in this scope; did you mean 'memo'?
   25 |     memo2[i]=mini;
      |     ^~~~~
      |     memo
a.cc:29:11: error: 'memo2' was not declared in this scope; did you mean 'memo'?
   29 |     FOR(j,memo2[i]){
      |           ^~~~~
a.cc:3:32: note: in definition of macro 'FOR'
    3 | #define FOR(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

#include <bits/stdc++.h>
#define double long double
#define int long long
#define mii map<int,int>
#define low lower_bound
#define upp upper_bound
#define inf 1000000007 //10^9+7
#define rep(i,n) for(int i=0;i<n;i++)
#define all(vec) vec.begin(),vec.end()
#define vsort(vec) sort(all(vec))
#define vrever(vec) reverse(all(vec));
#define vunsort(vec) vsort(vec); vrever(vec);
#define bisea binary_search
#define cend cout<<endl;
#define F first
#define S second
using namespace std;
signed main() {
	int n;
	cin>>n;
	int a=inf;
	int cnt[n][26];
	string y="abcdefghijklmnopqrstuvxxyz";
	rep(i,n) rep(j,26) cnt[i][j]=0;
	rep(i,n) {
		string s;
		cin>>s;
		int m=s.size();
		rep(j,m) {7
			cnt[i][s[j]-'a']++;
		}
	}
	rep(i,26) {
		rep(j,n) {
			a=min(a,cnt[j][i]);
		}
		rep(j,a) cout<<y[i];
		a=inf;
	}
	cend;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:28: error: expected ';' before 'cnt'
   29 |                 rep(j,m) {7
      |                            ^
      |                            ;
   30 |                         cnt[i][s[j]-'a']++;
      |                         ~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
	int n;
	cin >> n;
	vector<int> C(26, n);
	for(int i=0; i<n; i++) {
		string S;
		cin >> S;
		sort(S.begin(), S.end());
		char tmp = 'a';
		int tmpi = 0;
		for(int j=0; j<26; j++) {
		    int count = 0;
			while(tmpi < S.size() && S[tmpi] == tmp) {
				count++;
				tmpi++;
			}
			if(C[j] > count) C[j] = count;
			tmp++;
		}
	}
	char tmp = 'a';
	string ret;
	for(int i=0; i<26; i++) {
	   for(int j=0; j<C[i]; j++)
	      ret += tmp;
	   tmp++;
	}
	cout << ret << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |                 sort(S.begin(), S.end());
      |                 ^~~~
      |                 short
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int n, ans[27], a[27];
  string s;
  cin >> n;
  for(int j = 0; j < 27; j++){
      ans[i] = 0;
  }
  for(int i = 0; i < n; i++){
    cin >> s;
    for(int j = 0; j < 27; j++){
      a[i] = 0;
    }
    for(int j = 0; j < s.length(); j++){
      for(char c = 'a', int k = 0; c <= 'z'; c++, k++){
        if(c == s[j]) a[k]++;
      }
    }
    for(int j = 0; j < 27; j++){
      ans[i] = (a[i] > ans[i]) ? ans[i] : a[i];
    }
  }
  for(int i = 0, char c ='a'; c <= 'z'; c++, i++){
    for(int j = 0; j < ans[i]; j++)
      cout << c;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'i' was not declared in this scope
   10 |       ans[i] = 0;
      |           ^
a.cc:18:25: error: expected unqualified-id before 'int'
   18 |       for(char c = 'a', int k = 0; c <= 'z'; c++, k++){
      |                         ^~~
a.cc:18:24: error: expected ';' before 'int'
   18 |       for(char c = 'a', int k = 0; c <= 'z'; c++, k++){
      |                        ^~~~
      |                        ;
a.cc:18:44: error: expected ')' before ';' token
   18 |       for(char c = 'a', int k = 0; c <= 'z'; c++, k++){
      |          ~                                 ^
      |                                            )
a.cc:18:46: error: 'c' was not declared in this scope
   18 |       for(char c = 'a', int k = 0; c <= 'z'; c++, k++){
      |                                              ^
a.cc:18:51: error: 'k' was not declared in this scope
   18 |       for(char c = 'a', int k = 0; c <= 'z'; c++, k++){
      |                                                   ^
a.cc:26:18: error: expected unqualified-id before 'char'
   26 |   for(int i = 0, char c ='a'; c <= 'z'; c++, i++){
      |                  ^~~~
a.cc:26:17: error: expected ';' before 'char'
   26 |   for(int i = 0, char c ='a'; c <= 'z'; c++, i++){
      |                 ^~~~~
      |                 ;
a.cc:26:39: error: expected ')' before ';' token
   26 |   for(int i = 0, char c ='a'; c <= 'z'; c++, i++){
      |      ~                                ^
      |                                       )
a.cc:26:41: error: 'c' was not declared in this scope
   26 |   for(int i = 0, char c ='a'; c <= 'z'; c++, i++){
      |                                         ^
a.cc:26:46: error: 'i' was not declared in this scope
   26 |   for(int i = 0, char c ='a'; c <= 'z'; c++, i++){
      |                                              ^
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
int main() {
	ll N;
	cin >> N;
	map<char, ll>mp;
	map<char, ll>min_v;
	for (char c = 'a'; c <= 'z'; c++) {
		min_v[c] = 100000000;　//初期化
	}

	for (ll i = 0; i < N; i++) {
		string S;
		cin >> S;
		for (ll i = 0; i < S.size(); i++) {
			mp[S[i]]++;
		}
		for (char c = 'a'; c <= 'z'; c++) {
			min_v[c] = min(mp[c], min_v[c]); //最小の個数
			mp[c] = 0;
		}
	}
	string s = "";
	for (auto p : min_v) {
		ll x = p.first;
		ll y = p.second;
		for (ll i = 0; i < p.second; i++) {
			s += x; //見つかった回数だけ足す
		}
	}
	cout << s << endl;
}











Compiler output:
a.cc:11:38: error: extended character 　 is not valid in an identifier
   11 |                 min_v[c] = 100000000;　//初期化
      |                                      ^
a.cc: In function 'int main()':
a.cc:11:38: error: '\U00003000' was not declared in this scope
   11 |                 min_v[c] = 100000000;　//初期化
      |                                      ^~
Language: C++

#include<iostream>
#include<map>
#include<vector>
using namespace std;

int main() {
    int n;
    cin >> n;
    vector<string> v(n);
    for(int i = 0; i < n; i++) cin >> v[i];

    int cc[26];
    fill(cc, cc+26, 1e9+1);
    for(int i = 0; i < n; i++) {
        for(char c = 'a'; c <= 'z'; c++) {
            cc[c-'a'] = min(cc[c-'a'], (int)count(v[i].begin(), v[i].end(), c));
        }
    }

    string ans;
    for(int i = 0; i < 26; i++) {
        ans += string(cc[i], (char)i + 'a');
    }
    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:45: error: 'count' was not declared in this scope
   16 |             cc[c-'a'] = min(cc[c-'a'], (int)count(v[i].begin(), v[i].end(), c));
      |                                             ^~~~~
Language: C++

#include <iostream>
#define REP(i, n) for (int i = 0; i < n; ++i)
using namespace std;

int N, m[26][50];
int main(){
    cin >> N;
    REP(i,N) {
        string s;
        cin >> s;
        for (char c: s) {
            m[c - 'a'][i]++;
        }
    }
    REP(i,26) {
       int me = *min_element(m[i], m[i] + N);
       while (me--) cout << (char)('a' + i);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: 'min_element' was not declared in this scope
   16 |        int me = *min_element(m[i], m[i] + N);
      |                  ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <alogirhtm>

using namespace std;

int main(void){
	int n;

	cin >> n;

	vector<int> alp(26, 1000);


	string s;
	for (int i = 0; i < n; i++){
		cin >> s;
		vector<int> temp(26, 0);

		for (int j = 0; j < s.size(); j++){
			temp[s[j] - 'a']++;
		}

		for (int j = 0; j < 26; j++){
			alp[j] = min(alp[j], temp[j]);
		}
	}

	for (int i = 0; i < 26; i++){
		for (int j = 0; j < alp[i]; j++)
			cout << (char)(alp[i] - 'a');
	}

	cout << endl;
}

Compiler output:
a.cc:4:10: fatal error: alogirhtm: No such file or directory
    4 | #include <alogirhtm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}

#define N 26
ll a[N], b[N];

int main(){
	int n;
	cin>>n;
	fill(a, a+n, INF);
	rep(i, n){
		string s;
		cin>>s;
		mset(b, 0);
		rep(j, b.size()) b[s[j]-'a']++;
		rep(j, N) a[i] = min(a[i], b[i]);
	}
	rep(i, N) rep(j, a[i]) cout<<(char)('a'+i);
	cout<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:26: error: request for member 'size' in 'b', which is of non-class type 'll [26]' {aka 'long long int [26]'}
   52 |                 rep(j, b.size()) b[s[j]-'a']++;
      |                          ^~~~
a.cc:28:41: note: in definition of macro 'rep'
   28 | #define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
      |                                         ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  int num;
  char inStr[50][51];
  int moji[26][51];
  memset(moji,0,sizeof(moji));
  scanf("%d",&num);
  for(int i = 0;i < num;i++){
    scanf("%s", inStr[i]);
    fpurge(stdin);
  }

  for(int i=0;i< num;i++){
    for(int j=0;j<strlen(inStr[i]);j++){
      moji[i][inStr[i][j]-97]++;
    }
  }
  for(int i=0;i<26;i++){
    int flg = 1;
    int min=999999;
    for(int j=0;j<num;j++){
      if(moji[j][i] == 0)flg = 0;
      else{
        if(min > moji[j][i])min=moji[j][i];
      }
    }
    if(flg==1){
      for(int k=0;k<min;k++){
        printf("%c", (char)i+97);
      }
    }
  }
  printf("\n");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'fpurge' [-Wimplicit-function-declaration]
   11 |     fpurge(stdin);
      |     ^~~~~~
Language: C

#include <stdio.h>

int main(void){
    
    int i,j,n,min;
    char s[51][51];
    int a[51][26]={};
    int b[26]={};
    
    scanf( "%d",&n);
    
    for( i = 0; i < n; i++ ){
        scanf( "%s",s[i] );
    }
    
    for( i = 0; i < n; i++ ){
        for( j = 0; s[i][j] != '\0'; j++ ){
            a[i][s[i][j]-97]++;
        }
    }
    
    for( j = 0; j < 26; j++ ){
        min = 51;
        for( i = 0; i < n; i++ ){
            if(a[i][j] = min ){
                min = a[i][j];
            }
        }
        b[j] = min;
    }
    
    for( i = 0; i < 26; i++ ){
        for( j = 0; j < b[i]; j++ ){
            printf( "%c",97+i ):
        }
    }
    printf("\n");
    
    
    
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:32: error: expected ';' before ':' token
   34 |             printf( "%c",97+i ):
      |                                ^
      |                                ;
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int main() {
    int n;
    cin >> n;
    vector<string> s(n);
    for (int i = 0; i < n; i++) {
        cin >> s[i];
        sort(s[i].begin(), s[i].end());
    }
    int max_length = s[0].length(), it = 0;
    for (int i = 0; i < n; i++) {
        if (s[i].length() > max_length) { max_length = s[i].length(); it = i; }
    }
    int l, r, max_len = 0;
    for (int i = 0; i < s[it].length(); i++) {
        for (int j = i + 1; j <= s[it.length(); j++) {
            string tmp = s[it].substr(i, j);
            bool flag = true;
            for (int k = 0; k < n; k++) {
                if (s[k].find(tmp) == string::nops) {flag = false; break;}
            }
            if (flag) {
                if (tmp.length() > max_len) { l = i, r = j; max_len = tmp.length }
            }
        }
    }
    if (max_len > 0) cout << s[it].substr(l, r) << endl;
    else cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:39: error: request for member 'length' in 'it', which is of non-class type 'int'
   21 |         for (int j = i + 1; j <= s[it.length(); j++) {
      |                                       ^~~~~~
a.cc:21:47: error: expected ']' before ';' token
   21 |         for (int j = i + 1; j <= s[it.length(); j++) {
      |                                               ^
      |                                               ]
a.cc:25:47: error: 'nops' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   25 |                 if (s[k].find(tmp) == string::nops) {flag = false; break;}
      |                                               ^~~~
a.cc:28:75: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
   28 |                 if (tmp.length() > max_len) { l = i, r = j; max_len = tmp.length }
      |                                                                           ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <sys/time.h>

using namespace std;

void solve(int n, vector<string> s){
    //vector< vector<int> > bin(n vector<int>(26,0));
    vector< vector<int> > bin(26, vector<int>(n+1,0));
    string answer = "";
    for (int i = 0; i < n; i++) {
        while (!s[i].empty()) {
            for (int j = 0; j < 26; j++) {
                if (s[i].back() == 'a'+j) {
                    bin[j][i] += 1;
                    s[i].pop_back();
                    break;
                }
            }
        }
    }
    for (int i = 0; i < 26; i++) {
        bin[i][n] = *min_element(bin[i].begin(), bin[i].end()-1);
        for (int j = 0; j < bin[i][n]; j++) {
            answer.push_back('a' + i);
        }
    }
    cout << answer << endl;
}

int main(){
    struct timeval start,end;
    long long span;
    int n;

    gettimeofday(&start,NULL);
    cin >> n;
    vector<string> s(n);
    for (int i = 0; i < n; i++) {
        cin >> s[i];
    }
    solve(n, s);
    gettimeofday(&end,NULL);
    span = (end.tv_sec -start.tv_sec)*1000000LL + (end.tv_usec - start.tv_usec);
    fprintf(stderr,"**Total time: %lld ms\n",span/1000);
    return 0;
}


Compiler output:
a.cc: In function 'void solve(int, std::vector<std::__cxx11::basic_string<char> >)':
a.cc:24:22: error: 'min_element' was not declared in this scope
   24 |         bin[i][n] = *min_element(bin[i].begin(), bin[i].end()-1);
      |                      ^~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)

int main() {
	int n;
	string o[52],s[52],much;
	cin >> n;
	rep(i, 0, n) {
		cin >> o[i];
		s[i] = o[i];
		//cout << s[i] << " " << o[i] << endl;
	}
	rep(i, 0, s[0].size()) {
		char m = s[0][i];
		//cout << m <<" "<<"start"<< endl;
		bool flag = true;
		rep(j, 1, n) {
			if (s[j].find(m) == -1) {
				flag = false;
				break;
			}
		}
		if (flag == true) {
			rep(j, 0, n) {
				//cout << s[j].find(m) << endl;
				//s[j].erase(s[j].begin() + s[j].find(m),s[j].end());
				s[j].replace(s[j].find(m), 1, "*");
				//cout << s[j]<< endl;
			}
			much += m;
		}
	}
	sort(much.begin(), much.e

Compiler output:
a.cc: In function 'int main()':
a.cc:34:33: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'e'
   34 |         sort(much.begin(), much.e
      |                                 ^
a.cc:34:34: error: expected '}' at end of input
   34 |         sort(much.begin(), much.e
      |                                  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

//http://abc058.contest.atcoder.jp/tasks/arc071_a
#include <iostream>
using namespace std;

int n;
string S[50];

void readInput(){
    cin >> n;
    for(int i=0; i<n; i++){
        cin >> S[i];
    }
}

int main(void){
    readInput();
    int count[50][26];
    for(int i=0; i<n; i++){
        for(int j=0; j<S[i].size(); j++){
            int c = int(S[i][j])-int('a');
            count[i][c]++;
        }
    }

    for(int i=0; i<26; i++){
        int min = 10000;
        for(int j=0; j<n; j++){
            if(min > count[j][i]){
                min = count[j][i];
            }
        }
        for(int j=0; j<min; j++){
            cout << char(i+a);
        }
    }
    cout << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:28: error: 'a' was not declared in this scope
   33 |             cout << char(i+a);
      |                            ^
Language: C++

//http://abc058.contest.atcoder.jp/tasks/arc071_a
#include <iostream>
using namespace std;
 
int n;
string S[50];
 
void readInput(){
    cin >> n;
    for(int i=0; i<n; i++){
        cin >> S[i];
    }
}
 
int main(void){
    readInput();
    int count[50][26];
    const int a = int('a');
 
    for(int i=0; i<n; i++){
        int size = S[i].size();
        for(int j=0; j<size; j++){
            int c = int(S[i][j])-a;
            ::count[i][c]++;
        }
    }
    int min;
    for(int i=0; i<26; i++){
        min = 10000;
        for(int j=0; j<n; j++){
            if(min > ::count[j][i]){
                min = ::count[j][i];
            }
        }
        for(int j=0; j<min; j++){
            cout << char(i+a);
        }
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: '::count' has not been declared
   24 |             ::count[i][c]++;
      |               ^~~~~
a.cc:31:24: error: '::count' has not been declared
   31 |             if(min > ::count[j][i]){
      |                        ^~~~~
a.cc:32:25: error: '::count' has not been declared
   32 |                 min = ::count[j][i];
      |                         ^~~~~
Language: C++

#include <iostream>

using namespace std;
string s[60];
int main(void){
  int N;
  cin >> N;
  int i;
  for (int i=0;i<N;i++) cin >> s[i];
  string ans;
  for(char c="a";c<="z";c++){
    int small = 60;
    for (int i=0;i<N;i++){
      int cnt = 0;
      for(int j=0;j<s[i].length();j++)//cが何回現れるか
	if(s[i][j]==c) cnt++;
      small = min(small,cnt);
    }
    for(int i=0;i<small;i++) ans+=c;
  }
  cout << ans <<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |   for(char c="a";c<="z";c++){
      |              ^~~
      |              |
      |              const char*
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   for(char c="a";c<="z";c++){
      |                  ~^~~~~