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

#include <bits/stdc++.h>
#include <string.h>
#include <iostream>

 
 
using namespace std;

int check1(string s,int mn){
	int p=0;
//cout<<s<<endl;
	if (s.size()==1) return 1;
	int a[26];
	int c;
	int r;
	
	for(int k=0; k<26; k++){
		a[k]=0;
	}
	for(p=0; p<=s.size()-1; p++) {
		c=s[p]-'a';
		a[c]++;
	}

	for(p=s.size(); p>0; p--){
		int c2=0;
		for(int j=0; j<26; j++){
			if((a[j] % 2)==1) c2++;
			if(c2>1) break;
		}
//cout<<p<<","<<c2<<endl;
		if(c2<=1){
			if(p==s.size()) return 1;
			r=check1(s.substr(0,p))
			if(r < mn) r=r+check1(s.substr(p,s.size()-p));
			if(r<mn) mn=r;
		}
		c=s[p-1]-'a';
		a[c]--;
	}
	return mn;
}
		

int main(){
	string str;
	cin>>str;
	int r=check1(str,999999);
	cout<<r<<endl;
		
 
return 0;
}





Compiler output:
a.cc: In function 'int check1(std::string, int)':
a.cc:34:33: error: too few arguments to function 'int check1(std::string, int)'
   34 |                         r=check1(s.substr(0,p))
      |                           ~~~~~~^~~~~~~~~~~~~~~
a.cc:9:5: note: declared here
    9 | int check1(string s,int mn){
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define repp(i, m, n) for(int i = m; i < n; i++)
#define reps(i, n) for(int i = 1; i <= n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef long long ll;
typedef pair<int, int> pai;
typedef pair<ll,ll> pal;



int main()
{
	string s;
	cin >> s;
	char t[30][200010];
	set<string> st;
	map<string, int> table;
	rep(i, 26) t[i][0]='0';
	rep(i, s.size())
	{
		rep(j, 26)
		{
			if(j==(int)s[i]-(int)'a')
			{
				if(t[j][i]=='0') t[j][i+1]='1';
				else t[j][i+1]='0';
			}
			else t[j][i+1]=t[j][i];
		}
	}
	string u[200010]={};
	rep(i, s.size()+1) rep(j, 26) u[i]+=t[j][i];
	int tmp=0;
	rep(i, s.size()+1)
	{
		if(st.find(u[i])==st.end())
		{
			st.insert(u[i]);
			table.[u[i]]=tmp;
			tmp++;
		}
	}
	int e[200010];
	rep(i, s.size()+1) e[i]=-1;
	rep(i, s.size()+1)
	{
		if(e[table[u[i]]]==-1) e[table[u[i]]]=i;
	}
	int dp[200010]={};
	string x, y;
	int k, l, ml, mr, mm;
	reps(i, s.size())
	{
		dp[i]=500000;
		x=u[i];
		rep(j, 26)
		{
			y=x;
			if(y[j]=='0') y[j]='1';
			else y[j]='0';
			if(st.find(y)!=st.end())
			{
				k=table[y];
				ml=e[k];
				if(ml!=-1 && ml<i) dp[i]=min(dp[i], dp[ml]+1);
			}
		}
	}
	if(u[s.size()]!=u[0]) cout << dp[s.size()] << endl;
	else cout << '1' << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:31: error: expected unqualified-id before '[' token
   43 |                         table.[u[i]]=tmp;
      |                               ^
Language: C++

#include <bits/stdc++.h> 
 
using namespace std;
 
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
 
 
//typedef
//------------------------------------------
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
 
//container util
//------------------------------------------
#define PB emplace_back
#define MP make_pair 
#define SZ(a) int((a).size())
//repetition
//------------------------------------------
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
//constant
//--------------------------------------------
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
 
const LL INF=LONG_MAX;
const double EPS=0.00001;
const long double PI = acos(-1.0);
 
int dp[1<<26];
const int INF = 1e9;
 
int main() {
    string S;
    cin >> S;
    REP(i,(1<<26)) dp[i] = INF;
    dp[0] = 0;
    int stat = 0;
    REP(i,SZ(S)){
        stat ^= 1 << (S[i]-'a');
        REP(j,26) {
            int tmp = (stat^(1<<j));//今見ている文字がいない状態
            dp[stat] = min(dp[stat], dp[tmp]+1);
        }
    }
    cout<<max(dp[stat],1)<< endl;
    return 0;
}

Compiler output:
a.cc:34:11: error: conflicting declaration 'const int INF'
   34 | const int INF = 1e9;
      |           ^~~
a.cc:29:10: note: previous declaration as 'const LL INF'
   29 | const LL INF=LONG_MAX;
      |          ^~~
a.cc: In function 'int main()':
a.cc:39:28: warning: overflow in conversion from 'LL' {aka 'long long int'} to 'int' changes value from '9223372036854775807' to '-1' [-Woverflow]
   39 |     REP(i,(1<<26)) dp[i] = INF;
      |                            ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <sstream>
#include <string>
#define _repargs(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _repargs(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
#define mod 1000000007
#define inf 2000000007
#define mp make_pair
#define pb push_back
#define int long long
typedef long long ll;
using namespace std;
template <typename T>
inline void output(T a, int p = 0) {
    if(p) cout << fixed << setprecision(p)  << a << "\n";
    else cout << a << "\n";
}
// end of template

template <typename T> inline void voutput(T &v){
    rep(i, v.size()){
        if (i) cout << " " << v[i];
        else cout << v[i];
    }
    cout << endl;
}

int code(vector<int> &A){
    int ret = 0;
    rep(i, A.size()){
        ret *= 2;
        ret += A[i];
    }
    return ret;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    // source code
    string s;
    cin >> s;
    vector<int> A(26, 0);
    map<int, int> M;
    vector<int> C(s.size() + 1);
    M[0] = 0;
    C[0] = 0;
    rep(i, s.size()){
        A[s[i] - 'a'] ^= 1;
        if(M.count(code(A)) == 0) M[code(A)] = i + 1;
        C[i + 1] = code(A);
    }
    vector<int> dp(s.size() + 1, inf);
    dp[0] = 0;
    rep(i, 1, s.size() + 1){
        if(M.count(C[i])){
            dp[i] = min(dp[i], dp[M[C[i]]] + 1);
        }
        rep(j, 26){
            int c = C[i] ^ (1 << j);
            if(M.count(c)) {
                dp[i] = min(dp[i], dp[M[c]] + 1);
            }
        }
        dp[i] = min(dp[i], dp[i - 1] + 1);
    }
    output(dp[s.size()]);
    
    return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(LL i=0;i<(LL)(n);i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long
#define pii pair<LL,LL>
#define pll pair<LL,LL>

using namespace std;

int main(){

    string s;cin>>s;
    LL n=s.size();
    LL isOdd[n+1];
    fill_n(isOdd,n+1,0);

    LL dp[n+1];
    fill_n(dp,n+1,1000000);
    dp[0]=0;

    map<LL,LL> btoi;
    btoi[0]=0;

    REP(i,n){
        LL c = s[i]-'a';
        isOdd[i+1]=(isOdd[i]^(1<<c));
        REP(j,26){
            LL k = isOdd[i+1]^(1<<j);
            if(bLLoid.find(k)==bLLoid.end())continue;
            dp[i+1]=min(dp[i+1],dp[btoi[k]]+1);
        }
        if(btoi.find(isOdd[i+1])!=bLLoid.end()){
            if(dp[i+1]<dp[btoi[isOdd[i+1]]]+1){
                btoi[isOdd[i+1]]=i+1;
            }else{
                dp[i+1]=dp[btoi[isOdd[i+1]]]+1;
            }
        }else{
            btoi[isOdd[i+1]]=i+1;
        }
    }

    cout<<dp[n]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'bLLoid' was not declared in this scope
   29 |             if(bLLoid.find(k)==bLLoid.end())continue;
      |                ^~~~~~
a.cc:32:35: error: 'bLLoid' was not declared in this scope
   32 |         if(btoi.find(isOdd[i+1])!=bLLoid.end()){
      |                                   ^~~~~~
Language: C++

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

#define INF 2147483647
#define LINF 9223372036854775807
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(), (v).end()

typedef long long ll;
typedef pair<ll, int> P;

string s;
int cnt[26][200000],cnt2[26];
int ans;
bool flg;
int fst,snd;

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

	cin>>s;
	REP(i,s.size()) {
		if(i!=0){
			REP(j,26) cnt[j][i]=cnt[j][i-1];
		}
		cnt[s[i]-'a'][i]++;
		cnt2[s[i]-'a']++;
	}


	bool ok=false;
	REP(i,26) {
		if(cnt2[i]%2==1) ok=true;
	}
	if(!ok) {
		cout<<'1'<<endl;
		return 0;
	}

	REP(i,26) flg[i]=false;

	REP(i,s.size()) {
		if(cnt2[s[i]-'a']==1) {
			ans++;
			if(!flg) flg=true,fst=i,snd=i;
			else {
				fst=snd,snd=i;
				REP(j,26) {
					if(s[i]-'a'==j) continue;
					if((cnt2[j]-cnt[j][fst])%2==1&&cnt2[j]!=1) {
						ans++;
					}
				}
			}
		}
	}
	REP(i,26) {
		if(cnt2[i]%2==1&&cnt2[i]!=1) ans++;
	}
	cout<<ans<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:22: error: invalid types 'bool[int]' for array subscript
   43 |         REP(i,26) flg[i]=false;
      |                      ^
Language: C++

#pragma GCC optimize ("O3")
#pragma GCC target ("avx")

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>

using namespace std;

void fast(string s) {
  const int n = s.size();
  const int inf = 1e9;
  vector<int> dp0((n + 1) / 2 + 1, inf);
  vector<int> dp1(n / 2 + 1, inf);
  dp0[0] = 0;

  vector<int> x(n + 1);
  vector<int> x0((n + 1) / 2 + 1);
  vector<int> x1(n / 2 + 1);
  for (int i = 0; i < n; i++) {
    x[i + 1] = x[i] ^ (1 << s[i] - 'a');
  }
  for (int i = 0; i <= n; i++) {
    if (i % 2 == 0) {
      x0[i >> 1] = x[i];
    } else {
      x1[i >> 1] = x[i];
    }
  }

  // dp0[i] = dp[i * 2]
  // dp1[i] = dp[i * 2 + 1]

  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      int v = dp0[i >> 1] + 1;
      for (int j = i >> 1; j <= n / 2; j++) {
        int u = x1[j] ^ x0[i >> 1];
        dp1[j] = min(dp1[j], u & u - 1 ? inf : v);
      }
    } else {
      int v = dp1[i >> 1] + 1;
      for (int j = (i >> 1) + 1; j <= (n + 1) / 2; j++) {
        int u = x0[j] ^ x1[i >> 1];
        dp0[j] = min(dp0[j], u & u - 1 ? inf : v);
      }
    }
  }

  if (n % 2 == 0) {
    cout << dp0[(n + 1) / 2] << endl;
  } else {
    cout << dp1[n / 2] << endl;
  }
}

int main() {
  string s;
  cin >> s;

  const int n = s.size();

  int hoge = 0;
  for (char c : s) hoge ^= 1 << c - 'a';
  if (hoge == 0) {
    cout << 1 << endl;
    return 0;
  }

  if (n <= 150000) {
    fast(n);
    return 0;
  }

  vector<int> x(n + 1);
  for (int i = 0; i < n; i++) {
    x[i + 1] = x[i] ^ (1 << s[i] - 'a');
  }

  map<int, vector<int>> mp;
  for (int i = 1; i <= n; i++) {
    mp[x[i]].push_back(i);
  }
 
  queue<int> q;
  q.push(0);
 
  vector<int> d(n + 1, 1e9);
  d[0] = 0;
 
  while (!q.empty()) {
    int i = q.front(); q.pop();
 
    for (int k = 0; k < 26; k++) {
      int y = x[i] ^ (1 << k);
      if (mp.count(y)) {
        int j = mp[y].back();
        mp[y].pop_back();
        if (mp[y].empty()) {
          mp.erase(y);
        }
        q.push(j);
        d[j] = d[i] + 1;
      }
    }
  }
 
  cout << d[n] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:74:10: error: could not convert 'n' from 'const int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   74 |     fast(n);
      |          ^
      |          |
      |          const int
Language: C++

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

using namespace std;

bool judge(string str){
	int alpha[26];
	// 初期化
	for (size_t i = 0; i < 26; i++) {
		alpha[i] = 0;
	}

	for (size_t i = 0; i < str.size(); i++) {
		alpha[str[i]-'a']++;
		alpha[str[i]-'a'] %= 2;
	}

	int flag = false;
	for (size_t i = 0; i < 26; i++) {
		if (alpha[i] != 0) {
			if (flag) {
				return false;
			}
			else {
				flag = true;
			}
		}
	}
	return true;
}

int tansaku(string str, int count){
	string sub(str);
	std::vector<int> v;
	for (size_t i = 0; i < str.size(); i++) {
		if (judge(sub)) {
			string next(str);
			v.push_back(tansaku(next.erase(next.begin(), next.begin()+sub.size()) , count++));
		}
		sub.pop_back();
	}
	int ans = v[0];
	for (size_t i = 0; i < v.size(); i++) {
		ans = min(ans, v[i]);
	}
	return ans;
}

int main(int argc, char const *argv[]) {
	string str;
	std::cin >> str;
	std::cout << tansaku(str,1) << '\n';
	return 0;
}


Compiler output:
a.cc: In function 'int tansaku(std::string, int)':
a.cc:40:55: error: could not convert 'next.std::__cxx11::basic_string<char>::erase(__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >(next.std::__cxx11::basic_string<char>::begin()), __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >(next.std::__cxx11::basic_string<char>::begin().__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::operator+(((__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::difference_type)sub.std::__cxx11::basic_string<char>::size()))))' from 'std::__cxx11::basic_string<char>::iterator' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   40 |                         v.push_back(tansaku(next.erase(next.begin(), next.begin()+sub.size()) , count++));
      |                                             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                       |
      |                                                       std::__cxx11::basic_string<char>::iterator
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define repp(i, m, n) for(int i = m; i < n; i++)
#define reps(i, n) for(int i = 1; i <= n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef long long ll;
typedef pair<int, int> pai;
typedef pair<ll,ll> pal;



int main()
{
	string s;
	cin >> s;
	char t[30][200010];
	set<string> st;
	map<string, int> table;
	rep(i, 26) t[i][0]='0';
	rep(i, s.size())
	{
		rep(j, 26)
		{
			if(j==(int)s[i]-(int)'a')
			{
				if(t[j][i]=='0') t[j][i+1]='1';
				else t[j][i+1]='0';
			}
			else t[j][i+1]=t[j][i];
		}
	}
	string u[200010]={};
	rep(i, s.size()+1) rep(j, 26) u[i]+=t[j][i];
	int tmp=0;
	rep(i, s.size()+1)
	{
		if(st.find(u[i])==st.end())
		{
			st.insert(u[i]);
			table.[u[i]]=tmp;
			tmp++;
		}
	}
	int e[400010];
	rep(i, 2*s.size()+2) e[i]=-1;
	rep(i, s.size()+1)
	{
		if(e[2*table[u[i]]+i%2]==-1) e[2*table[u[i]]+i%2]=i;
	}
	int dp[200010]={};
	string x, y;
	int k, l, ml, mr, mm;
	reps(i, s.size())
	{
		dp[i]=500000;
		x=u[i];
		rep(j, 26)
		{
			y=x;
			if(y[j]=='0') y[j]='1';
			else y[j]='0';
			if(st.find(y)!=st.end())
			{
				k=2*table[y];
				if(i%2==0) k++;
				ml=e[k];
				if(ml!=-1 && ml<i) dp[i]=min(dp[i], dp[ml]+1);
			}
		}
	}
	if(u[s.size()]!=u[0]) cout << dp[s.size()] << endl;
	else cout << '1' << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:31: error: expected unqualified-id before '[' token
   43 |                         table.[u[i]]=tmp;
      |                               ^
Language: C++

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

int main() {
    string s;
    cin >> s;
    
    int cnt[26] = {0};
    for(int i=0; i<s.size(); ++i) {
        int temp = (int)(s[i] - 'a');
        ++cnt[temp];
    }
    int ans = 0;

    int odd = false;
    for(int i=0; i<26; ++i) {
        if(cnt[i] > 0) {
            if(cnt[i] % 2 == 0) {
                cnt[i] == 0;
                num -= cnt[i];
            } else if(odd==false){
                cnt[i] == 1;
                num -= (cnt[i] - 1);
            }
        }
    }
    ++ans;

    for(int i=0; i<26; i++) {
        if(cnt[i] % 2 == 1) +ans;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'num' was not declared in this scope; did you mean 'enum'?
   21 |                 num -= cnt[i];
      |                 ^~~
      |                 enum
a.cc:24:17: error: 'num' was not declared in this scope; did you mean 'enum'?
   24 |                 num -= (cnt[i] - 1);
      |                 ^~~
      |                 enum
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define repp(i, m, n) for(int i = m; i < n; i++)
#define reps(i, n) for(int i = 1; i <= n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef long long ll;
typedef pair<int, int> pai;
typedef pair<ll,ll> pal;



int main()
{
	string s;
	cin >> s;
	char t[30][200010];
	set<string> st;
	map<string, int> table;
	rep(i, 26) t[i][0]='0';
	rep(i, s.size())
	{
		rep(j, 26)
		{
			if(j==(int)s[i]-(int)'a')
			{
				if(t[j][i]=='0') t[j][i+1]='1';
				else t[j][i+1]='0';
			}
			else t[j][i+1]=t[j][i];
		}
	}
	string u[200010]={};
	rep(i, s.size()+1) rep(j, 26) u[i]+=t[j][i];
	int tmp=0;
	rep(i, s.size()+1)
	{
		if(st.find(u[i])==st.end())
		{
			st.insert(u[i]);
			table.[u[i]]=tmp;
			tmp++;
		}
	}
	int e[400010];
	rep(i, 2*s.size()+2) e[i]=-1;
	rep(i, s.size()+1)
	{
		if(e[2*table[u[i]]+i%2]==-1) e[2*table[u[i]]+i%2]=i;
	}
	int dp[200010]={};
	string x, y;
	int k, l, ml, mr, mm;
	reps(i, s.size())
	{
		dp[i]=500000;
		x=u[i];
		rep(j, 26)
		{
			y=x;
			if(y[j]=='0') y[j]='1';
			else y[j]='0';
			if(st.find(y)!=st.end())
			{
				k=2*table[y];
				if(i%2==0) k++;
				ml=e[k];
				if(ml==-1 || ml>=i) continue;
				else dp[i]=min(dp[i], dp[ml]+1);
			}
		}
	}
	if(u[s.size()]!=u[0]) cout << dp[s.size()] << endl;
	else cout << '1' << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:31: error: expected unqualified-id before '[' token
   43 |                         table.[u[i]]=tmp;
      |                               ^
Language: C++

int main() {
  string S;
  int i;
  cin >> S;
  int a=S.size();
  int ans=1;
  int left=0;

  while(left<a) {
		int flag[26];
		for(i=0;i<26;i++) flag[i]=1;
		for(i=left;i<a;i++) flag[S[i]-'a']*=-1;

		int k=a-1;
		int p=0;
		for(i=0;i<26;i++) p+=(flag[i]==-1);
		if(p>=2) {
			ans+=1;
		}
		while (p>=2) {
			if(flag[S[k]-'a']==-1) {
			  flag[S[k]-'a']=1;
			  p-=1;
			} else {
			  flag[S[k]-'a']=-1;
			  p+=1;
			}
			k-=1;
		}
		left=k+1;
  }
  cout << ans << endl;
  return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string S;
      |   ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> S;
      |   ^~~
a.cc:4:10: error: 'S' was not declared in this scope
    4 |   cin >> S;
      |          ^
a.cc:32:3: error: 'cout' was not declared in this scope
   32 |   cout << ans << endl;
      |   ^~~~
a.cc:32:18: error: 'endl' was not declared in this scope
   32 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define DUMP(v) REP(aa, (v).size()) { cout << v[aa]; if (aa != v.size() - 1)cout << " "; else cout << endl; }
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

const int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
const int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll max(ll a, int b) { return max(a, ll(b)); }
ll max(int a, ll b) { return max(ll(a), b); }
ll min(ll a, int b) { return min(a, ll(b)); }
ll min(int a, ll b) { return min(ll(a), b); }
///(´・ω・`)(´・ω・`)(´・ω・`)(´・ω・`)(´・ω・`)(´・ω・`)///
string s;
int n;
int dfs(vi &dp, vi &pos, vi &bit, int i) {
	if (i == n)return 0;
	if (dp[i] != -1)return dp[i];
	//cout << i << endl;
	int ret = INF;
	int b = bit[n]^bit[i];
	int popcount = 0;
	REP(j, 26) {
		if ((1 << j)&b)popcount++;
	}
	if (popcount <= 1)return dp[i] = 1;

	b = bit[i];
	if(pos[b]>=i){
		assert((pos[b] - i) % 2 == 0);
		ret = min(ret, 1+dfs(dp, pos, bit, pos[b] + 1));

	REP(k, 26) {
		int c = b ^ (1 << k);
		
		if (pos[c] >= i) {
			assert((pos[b] - i) % 2 == 1);
			ret = min(ret, 1 + dfs(dp, pos, bit, pos[c] + 1));
		}
	}
	return dp[i] = ret;

}

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

	cin >> s;
	n = s.size();
	vi bit(n + 1);

	vi pos(1 << 26,-1);
	bit[0] = 0;
	REP(i, n) {
		bit[i + 1] = bit[i] ^ (1 << (s[i] - 'a'));
		pos[bit[i + 1]]=i;
	
	}
	vi dp(n, -1);
	dfs(dp, pos, bit, 0);
	cout << dp[0] << endl;
}


Compiler output:
a.cc: In function 'int dfs(vi&, vi&, vi&, int)':
a.cc:62:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   62 | int main() {
      |         ^~
a.cc:62:9: note: remove parentheses to default-initialize a variable
   62 | int main() {
      |         ^~
      |         --
a.cc:62:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:62:12: error: a function-definition is not allowed here before '{' token
   62 | int main() {
      |            ^
a.cc:80:2: error: expected '}' at end of input
   80 | }
      |  ^
a.cc:33:42: note: to match this '{'
   33 | int dfs(vi &dp, vi &pos, vi &bit, int i) {
      |                                          ^
a.cc:80:2: warning: control reaches end of non-void function [-Wreturn-type]
   80 | }
      |  ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <queue>
#include <unordered_set>
#include <unordered_map>

using namespace std;

class Solver
{
private:
	string str;
	unordered_map<int, unordered_map<char, int> > um;
public:
	Solver() {
		cin >> str;
	}

	void exec() {
		for (int i = 0; i < str.size(); ++i)
		{
			um[i][str[i]]++;
			if(i != st.size() - 1) {
				um[i+1] = um[i];
			}
		}
		int ans = 0;
		for (auto itr : um[str.size() - 1]) {
			if(itr.second % 2 == 1) {
				ans++;
			}
		}
		cout << ans << endl;
	}
	
};

int main() {
	Solver ce = Solver();
	ce.exec();
}


Compiler output:
a.cc: In member function 'void Solver::exec()':
a.cc:26:33: error: 'st' was not declared in this scope; did you mean 'str'?
   26 |                         if(i != st.size() - 1) {
      |                                 ^~
      |                                 str
Language: C++

#include <iostream>
#include <float.h>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <fstream>
#include <queue>
#include <set>
#include <stdlib.h>
#include <time.h>
#include <list>
#include <stack>
#include <queue>
#include <sstream>

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

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
#define SORT(c) sort((c).begin(),(c).end())
#define vi(m,a) vector<int> m(a)
#define vti(m,a,i) vector<vector<int>> m(a,vector<int>(i))
#define ALL(it,a) for(auto it = a.begin(); it!=a.end(); it++)
#define Fe(it,a) for(auto &it : a)
#define all(a) begin(a),end(a)

using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;
#define WARU 1000000007;

int dx[] = { 1,0,-1,0 };
int dy[] = { 0,1,0,-1 };




int main() {
	string str;
	cin >> str;
	vector<int> dp(str.length());

	vector<set<int>> s(str.length());
	rep(i, str.length()) {
		set<char> odd;
		odd.insert(str[i]);
		For(k, i + 1, str.length()) {
			if (odd.count(str[k]) == 1) {
				odd.erase(str[k]);
			}
			else {
				odd.insert(str[k]);
			}
			if (odd.size() <= 1) {
				s[k].insert(i);
			}
		}
	}
	dp[0] = 1;
	For(i,1, str.length()) {
		int minimum = INT_MAX;
		ALL(it, s[i]) {
			if (*it == 0)
				minimum = 1;
			else
				minimum = min(minimum, dp[*it - 1] + 1);
		}
		dp[i] = min(dp[i - 1] + 1, minimum);
	}
	cout << dp[str.length() - 1] << endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:67:31: error: 'INT_MAX' was not declared in this scope
   67 |                 int minimum = INT_MAX;
      |                               ^~~~~~~
a.cc:17:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   16 | #include <stack>
  +++ |+#include <climits>
   17 | #include <queue>
Language: C++

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

string s;
int num[50];
int f[200010];

int main()
{
	ios::sync_with_stdio(false);
	cin>>s;
	for(int i=0;i<s.length();++i){
		if((num[s[i]-'a']&1)==1)tot--;
		else tot++;
		f[i]=tot;
	}
	cout<<tot<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:41: error: 'tot' was not declared in this scope
   13 |                 if((num[s[i]-'a']&1)==1)tot--;
      |                                         ^~~
a.cc:14:22: error: 'tot' was not declared in this scope
   14 |                 else tot++;
      |                      ^~~
a.cc:15:22: error: 'tot' was not declared in this scope
   15 |                 f[i]=tot;
      |                      ^~~
a.cc:17:15: error: 'tot' was not declared in this scope
   17 |         cout<<tot<<endl;
      |               ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <utility>
#include <cstring>
#include <cassert>
#include <cmath>
#include <stack>
#include <queue>

using namespace std;

const int MAXN = 205000;

struct node {
    int next[26];
    int len;
    int sufflink;
    int num;
};

int len;
char s[MAXN];
node tree[MAXN]; 
int answer[MAXN];
int num;            // node 1 - root with len -1, node 2 - root with len 0
int suff;           // max suffix palindrome
long long ans;

bool addLetter(int pos) {
    int cur = suff, curlen = 0;
    int let = s[pos] - 'a';

    while (true) {
        curlen = tree[cur].len;
        if (pos - 1 - curlen >= 0 && s[pos - 1 - curlen] == s[pos])     
            break;  
        cur = tree[cur].sufflink;
    }       
    if (tree[cur].next[let]) {  
        suff = tree[cur].next[let];
        return false;
    }

    num++;
    suff = num;
    tree[num].len = tree[cur].len + 2;
    tree[cur].next[let] = num;

    if (tree[num].len == 1) {
        tree[num].sufflink = 2;
        tree[num].num = 1;
        return true;
    }

    while (true) {
        cur = tree[cur].sufflink;
        curlen = tree[cur].len;
        if (pos - 1 - curlen >= 0 && s[pos - 1 - curlen] == s[pos]) {
            tree[num].sufflink = tree[cur].next[let];
            break;
        }       
    }           

    tree[num].num = 1 + tree[tree[num].sufflink].num;

    return true;
}

void initTree() {
    num = 2; suff = 2;
    tree[1].len = -1; tree[1].sufflink = 1;
    tree[2].len = 0; tree[2].sufflink = 1;
}

int main() {
    gets(s);
    len = strlen(s);

    initTree();
    for (int i = 0; i < len; i++) {
        addLetter(i);
        answer[i]=tree[suff].len;
    }
    int i=len-1;
    int ans1=0;
    while(i>=0)
    {
    	cerr<<i<<" "<<answer[i]<<endl;
    	ans1++;
    	i-=answer[i];
    }
    cout << ans1 << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:82:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   82 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <vector> 
#include <list> 
#include <map> 
#include <set> 
#include <deque> 
#include <queue> 
#include <stack> 
#include <bitset> 
#include <algorithm> 
#include <functional> 
#include <numeric> 
#include <utility> 
#include <sstream> 
#include <iostream> 
#include <iomanip> 
#include <cstdio> 
#include <cmath> 
#include <cstdlib> 
#include <cctype> 
#include <string> 
#include <cstring> 
#include <ctime> 

using namespace std;

#define _int64 long long

char s[210000];
short ma[1<<26];
int used[1<<26];

int main()
{
  int i,l,now,tmp,bma,btmp,ans,j,x,y;
  vector<int> q;
  scanf("%s",s);
  l=strlen(s);
  now=0;
  memset(ma,0,sizeof(ma));
  ma[0]=1;
  for (i=0;i<l;i++)
  {
    now^=(1<<(s[i]-'a'));
    ma[now]=1;
  }
  if (now==0)
  {
    ans=1;
  }
  else
  {
    q.clear();
    q.push_back(0);
    memset(used,-1,sizeof(used));
    used[0]=0;
    for (i=0;i<q.size();i++)
    {
      x=q[i];
      for (j=0;j<26;j++)
      {
        y=(x^(1<<j));
        if ((used[y]==-1)&&(ma[y]!=0))
        {
          used[y]=used[x]+1;
          q.push_back(y);
        }
      /*
      if ((used[x]==-1)&&(ma[x]!=0))
      {
        used[x]=1;
        q.push_back(x);
      }
      */
    }
    ans=used[now];
  }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:2: error: expected '}' at end of input
   79 | }
      |  ^
a.cc:33:1: note: to match this '{'
   33 | {
      | ^
Language: C++

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

typedef pair<int, int> Pair;

const int INF = 0x3fffffff;
int N;
char S[200001];
int type[200001];
int dp[200001];
int nxt[200001];
queue<int> qs[200001];
vector<int> es[200001];
map<int, vector<int>> belong;

int main() {
  scanf("%s", S);
  N = strlen(S);
  
  type[0] = 0;
  belong[0].emplace_back(0);
  int bit = 0;
  for (int i=0; i<N; i++) {
    bit ^= (1 << int(S[i]-'a'));
    belong[bit].emplace_back(i+1);
    type[i+1] = bit;
  }

  for (int i=0; i<N; i++) {
    es[i].reserve(26);
    for (int j=0; j<26; j++) {
      int t = type[v] ^ (1<<j);
      auto &vec = belong[t];
      auto itr = upper_bound(vec.begin(), vec.end(), v);
      if (itr == vec.end()) continue;
      es[i].emplace_back(*itr);
    }

    auto &vec = belong[type[v]];
    auto itr = upper_bound(vec.begin(), vec.end(), v);
    if (itr != vec.end()) nxt[v] = *itr;
    else nxt[v] = -1;
  }

  fill(dp, dp+N+1, INF);
  dp[0] = 0;
  qs[0].push(0);
  for (int i=0; i<N; i++) {
    while (!qs[i].empty()) {
      int v = qs[i].front(); qs[i].pop();
      if (v == N) continue;
      assert(dp[v] == i);

      auto &vec = belong[type[v]];
      auto itr = upper_bound(vec.begin(), vec.end(), v);
      
      if (nxt[v] != -1) {
        int u = nxt[v];
        if (dp[u] > dp[v]) {
          dp[u] = dp[v];
          qs[i].push(u);
        }
      }

      for (int u : es[v]) {
        if (dp[u] > dp[v]+1) {
          dp[u] = dp[v]+1;
          qs[i+1].push(u);
        }
      }
    }
  }

  if (!dp[N]) dp[N]++;
  printf("%d\n", dp[N]);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:32:20: error: 'v' was not declared in this scope
   32 |       int t = type[v] ^ (1<<j);
      |                    ^
a.cc:39:29: error: 'v' was not declared in this scope
   39 |     auto &vec = belong[type[v]];
      |                             ^
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
using namespace std;
template<typename T>
void get(T& t){cin >> t;}

string str;
void proce(int start, vector<int>& distances, int dist, int bb_full){
	if(dist > distainces[str.size() - 1])return;
	int bb_ = 0;
	for(int i=str.size() - 1;i >= start;i--){
		int bb = bb_full ^ bb_;
		if((bb & (bb - 1))== 0 && distances[i] > dist + 1){
			distances[i] = dist + 1;
			proce(i + 1, distances, dist + 1, bb_);
		}
		bb_ ^=1 << (str.at(i)-'a');
	}
	return ;
}
int main(void){
	get(str);
	vector<int> distances(str.size() + 1);
	int bb = 0;
	for(int i=0;i<str.size();i++){
		distances[i] = str.size();
		bb ^=1 << (str.at(i)-'a');
	}
	proce(0, distances, 0, bb);
	cout << distances[str.size() - 1]<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'void proce(int, std::vector<int>&, int, int)':
a.cc:13:19: error: 'distainces' was not declared in this scope; did you mean 'distances'?
   13 |         if(dist > distainces[str.size() - 1])return;
      |                   ^~~~~~~~~~
      |                   distances
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long
#define pii pair<int,int>
#define pll pair<LL,LL>

using namespace std;

int main(){

    string s;cin>>s;
    int n=s.size();
    int isOdd[n+1];
    fill_n(isOdd,n+1,0);

    int dp[n+1];
    fill_n(dp,n+1,1000000);
    dp[0]=0;

    map<int,int> bintoid;
    int vec[n+1];
    fill_n(vec,n+1,-1);
    vec[0]=0;
    bintoid[0]=0;

    int nid = 1;

    REP(i,n){
        int c = s[i]-'a';
        isOdd[i+1]=(isOdd[i]^(1<<c));
        REP(j,26){
            int k = isOdd[i+1]^(1<<j);
            if(bintoid.find(k)==bintoid.end())continue;
            int id = bintoid[k];
            //for(int v : vec[id])dp[i+1]=min(dp[i+1],dp[v]+1);
            dp[i+1]=min(dp[i+1],dp[vec[id]]+1);
        }
        if(bintoid.find(isOdd[i+1])!=bintoid.end()){
            //for(int v:vec[bintoid[isOdd[i+1]]])dp[i+1]=min(dp[i+1],dp[v]+1);
            dp[i+1]=min(dp[i+1],dp[vec[bintoid[isOdd[i+1]]]]+1);
        }

        if(bintoid.find(isOdd[i+1])==bintoid.end()){
            bintoid[isOdd[i+1]]=nid++;
        }
        vec[bintoid[isOdd[i+1]]].push_back(i+1);

    }

    cout<<dp[n]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:34: error: request for member 'push_back' in 'vec[bintoid.std::map<int, int>::operator[](isOdd[(i + 1)])]', which is of non-class type 'int'
   47 |         vec[bintoid[isOdd[i+1]]].push_back(i+1);
      |                                  ^~~~~~~~~
Language: C++

#include <iostream>
#include <iomanip> // << fixed << setprecision(xxx)
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <vector>
#include <string> // to_string(nnn) // substr(m, n) // stoi(nnn)
#include <complex>
#include <tuple> // get<n>(xxx)
#include <queue>
#include <stack>
#include <map> // if (M.find(key) != M.end()) { }
#include <set> // S.insert(M);
// if (S.find(key) != S.end()) { }
// for (auto it=S.begin(); it != S.end(); it++) { }
// auto it = S.lower_bound(M);
#include <random> // random_device rd; mt19937 mt(rd());
#include <cctype>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib> // atoi(xxx)
using namespace std;

#define DEBUG 0 // change 0 -> 1 if we need debug.
// insert #if<tab> by my emacs. #if DEBUG == 1 ... #end

typedef long long ll;

// const int dx[4] = {1, 0, -1, 0};
// const int dy[4] = {0, 1, 0, -1};

// const int C = 1e6+10;
// const ll M = 1000000007;

string S;

map<int, int> SS;

int ctoi(char c) {
  int cnt = c - 'a';
  return (1 << cnt);
}

int main () {
  cin >> S;
  int N = S.size();
  int cnt[26];
  fill(cnt, cnt+26, 0);
  for (auto x : S) {
    cnt[x - 'a']++;
  }
  bool ok = true;
  for (auto i = 0; i < 26; ++i) {
    if (cnt[i] % 2  != 0) ok = false;
  }
  if (ok) {
    cout << 1 << endl;
    return 0;
  }
  int dp[200010];
  dp[0] = 1;
  dp[1] = 1;
  int now = 0;
  now = now ^ ctoi(S[0]);
  for (auto i = 2; i <= N; ++i) {
    now = now ^ ctoi(S[i-1]);
    if (SS.find(now) == SS.end()) {
      SS[now] = i;
      dp[i] = dp[i-1] + 1;
    } else {
      dp[i] = dp[SS[now]];
    }
  }
  cout << dp[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:73:14: error: 'i' was not declared in this scope
   73 |   cout << dp[i] << endl;
      |              ^
Language: C++

//A,Elebereth Gilthoniel mantae!
//For Temeria!
#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<cstdio>
#include<map>
#include<stack>
#include<queue>
#include<cstring> 
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
const int kk=27;
set<int> s[1<<kk]; 
int dp[200000+18];int pa[200000+18];
int main()
{
 	//freopen("","r",stdin);
	//freopen("","w",stdout);
	string ss;cin>>ss;int t=0;
	for(int i=0;i<ss.size();i++)
	{
		int a=ss[i]-'a';
		if(((1<<a)&(t))) t-=1<<a;
		else t+=1<<a;
		s[t].insert(i);
		pa[i]=t;
	}
	for(int i=0;i<20000+15;i++) dp[i]=12345678;
	dp[0]=1;
	for(int i=0;i<ss.size();i++)
	{
		if(1)
		{
			int q=*(s[pa[i]].lower_bound(i+1));
			if(s[pa[i]].lower_bound(i+1)!=s[pa[i]].end())dp[q]=min(dp[i],dp[q]);
			for(int j=0;j<kk;j++)
			{
				int y=pa[i];if((pa[i])&(1<<j))y-=1<<j;else y+=1<<j;
				if(s[y].lower_bound(i)==s[y].end()) continue;
				q=*(s[y].lower_bound(i));dp[q]=min(dp[q],dp[i]+1);
				
			}
			//q=*(s[0].lower_bound(i));dp[q]=min(dp[q],dp[i]+1);
		}	
	}cout<<dp[ss.size()-1];
	return 0;
}

Compiler output:
/tmp/ccGXD1Nu.o: in function `main':
a.cc:(.text+0xea): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x142): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x15c): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x186): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x1ea): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x22a): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x291): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x2ab): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x2d0): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x2f6): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/ccGXD1Nu.o
a.cc:(.text+0x313): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

//A,Elebereth Gilthoniel mantae!
//For Temeria!
#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<cstdio>
#include<map>
#include<stack>
#include<queue>
#include<cstring> 
using namespace std;
const int kk=27;
set<int> s[1<<kk]; 
int dp[200000+18];int pa[200000+18];
int main()
{
 	//freopen("","r",stdin);
	//freopen("","w",stdout);
	string ss;cin>>ss;int t=0;
	for(int i=0;i<ss.size();i++)
	{
		int a=ss[i]-'a';
		if(((1<<a)&(t))) t-=1<<a;
		else t+=1<<a;
		s[t].insert(i);
		pa[i]=t;
	}
	for(int i=0;i<20000+15;i++) dp[i]=12345678;
	dp[0]=1;
	for(int i=0;i<ss.size();i++)
	{
		if(1)
		{
			int q=*(s[pa[i]].lower_bound(i+1));
			if(s[pa[i]].lower_bound(i+1)!=s[pa[i]].end())dp[q]=min(dp[i],dp[q]);
			for(int j=0;j<kk;j++)
			{
				int y=pa[i];if((pa[i])&(1<<j))y-=1<<j;else y+=1<<j;
				if(s[y].lower_bound(i)==s[y].end()) continue;
				q=*(s[y].lower_bound(i));dp[q]=min(dp[q],dp[i]+1);
				
			}
			//q=*(s[0].lower_bound(i));dp[q]=min(dp[q],dp[i]+1);
		}	
	}cout<<dp[ss.size()-1];
	return 0;
}

Compiler output:
/tmp/cczqm090.o: in function `main':
a.cc:(.text+0xea): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x142): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x15c): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x186): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x1ea): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x22a): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x291): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x2ab): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x2d0): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x2f6): relocation truncated to fit: R_X86_64_PC32 against symbol `pa' defined in .bss section in /tmp/cczqm090.o
a.cc:(.text+0x313): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long   // <-----!!!!!!!!!!!!!!!!!!!

#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(a)-1;i>=b;i--)
#define chmin(a,b) (a)=min((a),(b));
#define chmax(a,b) (a)=max((a),(b));
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define printV(v) cerr<<(#v)<<":";for(auto(x):(v)){cerr<<" "<<(x);}cerr<<endl;
#define printVS(vs) cerr<<(#vs)<<":"<<endl;for(auto(s):(vs)){cerr<<(s)<< endl;}
#define printVV(vv) cerr<<(#vv)<<":"<<endl;for(auto(v):(vv)){for(auto(x):(v)){cerr<<" "<<(x);}cerr<<endl;}
#define printP(p) cerr<<(#p)<<(p).first<<" "<<(p).second<<endl;
#define printVP(vp) cerr<<(#vp)<<":"<<endl;for(auto(p):(vp)){cerr<<(p).first<<" "<<(p).second<<endl;}

inline void output(){ cerr << endl; }
template<typename First, typename... Rest>
inline void output(const First& first, const Rest&... rest) {
    cerr << first << " "; output(rest...);
}

using ll = long long;
using Pii = pair<int, int>;
using TUPLE = tuple<int, int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
const int inf = 1ll << 60;
const int mod = 1e9 + 7;
using Graph = vector<vector<int>>;

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

    string s;
    cin >> s;
    map<char, int> mp;
    rep(i, s.size()) {
        mp[s[i]++];
    }

    int ans = 0;
    for (auto p : mp) {
        if (mp.second % 2 == 0) {
            ans++;
        }
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:16: error: 'class std::map<char, long long int>' has no member named 'second'
   48 |         if (mp.second % 2 == 0) {
      |                ^~~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int main(void)
{
  string s;
  cin >> s;
  int m[256];
  REP(i,26) m['a'+i]=(1<<i);
  int tmp=0;
  map<int,int> d;
  for(auto i=s.begin();i!=s.end();++i){
    tmp=(tmp^m[*i]);
    d[tmp]=-33554432;
  }
  priority_queue<pair<int,int> > q; // negc, v;
  q.push(make_pair(0,0));
  d[0]=0;
  while(!q.empty()) {
    int nc,v;
    tie(c,v) = q.top();
    q.pop();
    REP(i,26){
      if(d[v^(1<<i)]<c-1){
        q.push(make_pair(v^(1<<i),c-1));
        d[v^(1<<i)]=c-1;
      }
    }
  }
  cout << max(1,-d[tmp]) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'c' was not declared in this scope
   26 |     tie(c,v) = q.top();
      |         ^
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int main(void)
{
  string s;
  cin >> s;
  int m[256];
  REP(i,26) m['a'+i]=(1<<i);
  int tmp=0;
  map<int,int> d;
  for(auto i=s.begin();i!=s.end();++i){
    tmp=(tmp^m[*i]);
    d[tmp]=-33554432;
  }
  priority_queue<pair<int,int> > q; // negc, v;
  q.push(0,0);
  d[0]=0;
  while(!q.empty()) {
    int nc,v;
    tie(c,v) = q.top();
    q.pop();
    REP(i,26){
      if(d[v^(1<<i)]<c-1){
        q.push(make_pair(v^(1<<i),c-1));
        d[v^(1<<i)]=c-1;
      }
    }
  }
  cout << max(1,-d[tmp]) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: no matching function for call to 'std::priority_queue<std::pair<int, int> >::push(int, int)'
   22 |   q.push(0,0);
      |   ~~~~~~^~~~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:736:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >; _Compare = std::less<std::pair<int, int> >; value_type = std::pair<int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_queue.h:744:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >; _Compare = std::less<std::pair<int, int> >; value_type = std::pair<int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note:   candidate expects 1 argument, 2 provided
a.cc:26:9: error: 'c' was not declared in this scope
   26 |     tie(c,v) = q.top();
      |         ^
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
 
using namespace std;
int main(void)
{
  string s;
  cin >> s;
  int m[256];
  REP(i,26) m['a'+i]=(1<<i);
  int tmp=0;
  map<int,int> v;
  for(auto i=s.begin();i!=s.end();++i){
    tmp=(tmp^m[*i]);
    d[tmp]=-33554432;
  }
  priority_queue<pair<int,int> > q; // negc, v;
  q.push(0,0);
  d[0]=0;
  while(!q.empty()) {
    int nc,v;
    tie(c,v) = q.top();
    q.pop();
    REP(i,26){
      if(d[v^(1<<i)]<c-1){
        q.push(make_pair(v^(1<<i),c-1));
        d[v^(1<<i)]=c-1;
      }
    }
  }
  cout << max(1,-d[tmp]) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'd' was not declared in this scope
   19 |     d[tmp]=-33554432;
      |     ^
a.cc:22:9: error: no matching function for call to 'std::priority_queue<std::pair<int, int> >::push(int, int)'
   22 |   q.push(0,0);
      |   ~~~~~~^~~~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:736:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >; _Compare = std::less<std::pair<int, int> >; value_type = std::pair<int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_queue.h:744:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >; _Compare = std::less<std::pair<int, int> >; value_type = std::pair<int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note:   candidate expects 1 argument, 2 provided
a.cc:23:3: error: 'd' was not declared in this scope
   23 |   d[0]=0;
      |   ^
a.cc:26:9: error: 'c' was not declared in this scope
   26 |     tie(c,v) = q.top();
      |         ^