Language: C++

//#summon tourist
//#define _GLIBCXX_DEBUG
//実行時エラー、なぜ？？？
include <bits/stdc++.h>
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
#define pb push_back
using namespace std;
using ll=long long;
using ld=long double;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
struct edge{ll to,cost;};
struct edge2{ll from,to,cost;};

template <typename T>
bool chmax(T &a, const T& b) {
    if (a < b) {
      a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmin(T &a, const T& b) {
    if (a > b) {
      a = b;
      return true;
    }
    return false;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    string s;
    cin >> s;
    int n=s.size();
    vector<int> dp(n+1);
    vector<int> acc(n+1);
    acc[0]=0;
    vector<int> first(1<<26);
    rep(i,1<<26){
        first[i]=n;
    }
    first[0]=0;
    int now=0;
    rep(i,n){
        now=(ll)pow(2,s[i]-'a');
        acc[i+1]=acc[i]^now;
        if(first[acc[i+1]]==n){
            first[i+1]=now;
        }
    }
    rep(i,n+1){
        dp[i]=2*n;
    }
    dp[0]=0;
    rep(i,n){
        dp[i+1]=min(dp[i]+1,dp[first[now]]+1);
        ll k=1;
        rep(j,26){
            chmin(dp[i+1],dp[first[k^(i+1)]]+1);
            k*=2;
        }
    }
    cout << dp[n] << endl;
}
/*
overflow checked?
corner case checked?
boundary checked?
not TLE in worst case checked?
*/

Compiler output:
a.cc:4:1: error: 'include' does not name a type
    4 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:14:9: error: 'pair' does not name a type
   14 | typedef pair<ll,ll> P;
      |         ^~~~
a.cc:15:9: error: 'vector' does not name a type
   15 | typedef vector<ll> vl;
      |         ^~~~~~
a.cc:16:9: error: 'vector' does not name a type
   16 | typedef vector<vl> vvl;
      |         ^~~~~~
a.cc:17:9: error: 'vector' does not name a type
   17 | typedef vector<P> vP;
      |         ^~~~~~
a.cc:18:9: error: 'vector' does not name a type
   18 | typedef vector<ch> vc;
      |         ^~~~~~
a.cc:19:9: error: 'vector' does not name a type
   19 | typedef vector<vc> vvc;
      |         ^~~~~~
a.cc:22:13: error: 'acos' was not declared in this scope
   22 | const ld PI=acos(-1);
      |             ^~~~
a.cc: In function 'int main()':
a.cc:46:5: error: 'ios' has not been declared
   46 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:47:5: error: 'cin' was not declared in this scope
   47 |     cin.tie(nullptr);
      |     ^~~
a.cc:48:5: error: 'string' was not declared in this scope
   48 |     string s;
      |     ^~~~~~
a.cc:49:12: error: 's' was not declared in this scope
   49 |     cin >> s;
      |            ^
a.cc:51:5: error: 'vector' was not declared in this scope
   51 |     vector<int> dp(n+1);
      |     ^~~~~~
a.cc:51:12: error: expected primary-expression before 'int'
   51 |     vector<int> dp(n+1);
      |            ^~~
a.cc:52:12: error: expected primary-expression before 'int'
   52 |     vector<int> acc(n+1);
      |            ^~~
a.cc:53:5: error: 'acc' was not declared in this scope
   53 |     acc[0]=0;
      |     ^~~
a.cc:54:12: error: expected primary-expression before 'int'
   54 |     vector<int> first(1<<26);
      |            ^~~
a.cc:56:9: error: 'first' was not declared in this scope
   56 |         first[i]=n;
      |         ^~~~~
a.cc:58:5: error: 'first' was not declared in this scope
   58 |     first[0]=0;
      |     ^~~~~
a.cc:61:17: error: 'pow' was not declared in this scope; did you mean 'now'?
   61 |         now=(ll)pow(2,s[i]-'a');
      |                 ^~~
      |                 now
a.cc:68:9: error: 'dp' was not declared in this scope
   68 |         dp[i]=2*n;
      |         ^~
a.cc:70:5: error: 'dp' was not declared in this scope
   70 |     dp[0]=0;
      |     ^~
a.cc:72:17: error: 'min' was not declared in this scope; did you mean 'main'?
   72 |         dp[i+1]=min(dp[i]+1,dp[first[now]]+1);
      |                 ^~~
      |                 main
a.cc:79:5: error: 'cout' was not declared in this scope
   79 |     cout << dp[n] << endl;
      |     ^~~~
a.cc:79:22: error: 'endl' was not declared in this scope
   79 |     cout << dp[n] << endl;
      |                      ^~~~