Language: C++

int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
    bitset<99> c,d;
    if(i==bs.size()){
        return sum;
    }
    c=a^bs.at(i);
    d=a|bs.at(i);
    if(c!=d){
        return dfs(i+1,bs,a,sum);
    }
    return max(dfs(i+1,bs,a,sum),dfs(i+1,bs,c,sum+1));
}

int main(){
    ll a, b, ans=0;
    cin >> a >> b;
    if(a>b)swap(a,b);
    vector<ll> vec(0),codiv(0);
    rep(i,sqrt(a)-1){
        if(a%(i+1)==0){
            vec.push_back(i+1);
            if((i+1)*(i+1)!=a)vec.push_back(a/(i+1));
        }
    }
    sort(vec.begin(),vec.end());
    rep(i,vec.size()){
        if(((b%vec.at(i))==0)&&(vec.at(i)>1))codiv.push_back(vec.at(i));
    }
    ll n=codiv.size();
    vector<bitset<99> > bs(n);
    rep(i,n){
        rep(j,i+1){
            if(codiv.at(i)%codiv.at(j)==0){
                bs.at(i).set(j);
            }
        }
    }
    bitset<99> bit;
    cout << ((n>0)?dfs(0,bs,bit,1):1) << endl;
}
    


Compiler output:
a.cc:1:9: error: 'll' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |         ^~
a.cc:1:14: error: 'vector' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |              ^~~~~~
a.cc:1:21: error: 'bitset' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                     ^~~~~~
a.cc:1:32: error: expected primary-expression before '>' token
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                ^
a.cc:1:34: error: 'bs' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                  ^~
a.cc:1:37: error: 'bitset' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                     ^~~~~~
a.cc:1:48: error: 'a' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                                ^
a.cc:1:50: error: 'll' was not declared in this scope
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                                  ^~
a.cc:1:56: error: expression list treated as compound expression in initializer [-fpermissive]
    1 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                                        ^
a.cc: In function 'int main()':
a.cc:15:5: error: 'll' was not declared in this scope
   15 |     ll a, b, ans=0;
      |     ^~
a.cc:16:5: error: 'cin' was not declared in this scope
   16 |     cin >> a >> b;
      |     ^~~
a.cc:16:12: error: 'a' was not declared in this scope
   16 |     cin >> a >> b;
      |            ^
a.cc:16:17: error: 'b' was not declared in this scope
   16 |     cin >> a >> b;
      |                 ^
a.cc:17:12: error: 'swap' was not declared in this scope
   17 |     if(a>b)swap(a,b);
      |            ^~~~
a.cc:18:5: error: 'vector' was not declared in this scope
   18 |     vector<ll> vec(0),codiv(0);
      |     ^~~~~~
a.cc:18:16: error: 'vec' was not declared in this scope
   18 |     vector<ll> vec(0),codiv(0);
      |                ^~~
a.cc:18:23: error: 'codiv' was not declared in this scope
   18 |     vector<ll> vec(0),codiv(0);
      |                       ^~~~~
a.cc:19:9: error: 'i' was not declared in this scope
   19 |     rep(i,sqrt(a)-1){
      |         ^
a.cc:19:11: error: 'sqrt' was not declared in this scope
   19 |     rep(i,sqrt(a)-1){
      |           ^~~~
a.cc:19:5: error: 'rep' was not declared in this scope
   19 |     rep(i,sqrt(a)-1){
      |     ^~~
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |     sort(vec.begin(),vec.end());
      |     ^~~~
      |     short
a.cc:29:7: error: expected ';' before 'n'
   29 |     ll n=codiv.size();
      |       ^~
      |       ;
a.cc:30:12: error: 'bitset' was not declared in this scope
   30 |     vector<bitset<99> > bs(n);
      |            ^~~~~~
a.cc:30:23: error: expected primary-expression before '>' token
   30 |     vector<bitset<99> > bs(n);
      |                       ^
a.cc:30:28: error: 'n' was not declared in this scope
   30 |     vector<bitset<99> > bs(n);
      |                            ^
a.cc:30:25: error: 'bs' was not declared in this scope
   30 |     vector<bitset<99> > bs(n);
      |                         ^~
a.cc:38:16: error: 'bit' was not declared in this scope
   38 |     bitset<99> bit;
      |                ^~~
a.cc:39:5: error: 'cout' was not declared in this scope
   39 |     cout << ((n>0)?dfs(0,bs,bit,1):1) << endl;
      |     ^~~~
a.cc:39:23: error: 'dfs' cannot be used as a function
   39 |     cout << ((n>0)?dfs(0,bs,bit,1):1) << endl;
      |                    ~~~^~~~~~~~~~~~
a.cc:39:42: error: 'endl' was not declared in this scope
   39 |     cout << ((n>0)?dfs(0,bs,bit,1):1) << endl;
      |                                          ^~~~