Language: C++

#include<bits/stdc++.h>
using namespace std;
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:3:9: error: 'll' was not declared in this scope
    3 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |         ^~
a.cc:3:34: error: expected primary-expression before 'bs'
    3 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                  ^~
a.cc:3:48: error: expected primary-expression before 'a'
    3 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                                ^
a.cc:3:50: error: 'll' was not declared in this scope
    3 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                                  ^~
a.cc:3:56: error: expression list treated as compound expression in initializer [-fpermissive]
    3 | int dfs(ll i,vector<bitset<99> > bs,bitset<99> a,ll sum){
      |                                                        ^
a.cc: In function 'int main()':
a.cc:17:5: error: 'll' was not declared in this scope
   17 |     ll a, b, ans=0;
      |     ^~
a.cc:18:12: error: 'a' was not declared in this scope
   18 |     cin >> a >> b;
      |            ^
a.cc:18:17: error: 'b' was not declared in this scope
   18 |     cin >> a >> b;
      |                 ^
a.cc:20:14: error: template argument 2 is invalid
   20 |     vector<ll> vec(0),codiv(0);
      |              ^
a.cc:21:9: error: 'i' was not declared in this scope
   21 |     rep(i,sqrt(a)-1){
      |         ^
a.cc:21:5: error: 'rep' was not declared in this scope
   21 |     rep(i,sqrt(a)-1){
      |     ^~~
a.cc:27:14: error: request for member 'begin' in 'vec', which is of non-class type 'int'
   27 |     sort(vec.begin(),vec.end());
      |              ^~~~~
a.cc:27:26: error: request for member 'end' in 'vec', which is of non-class type 'int'
   27 |     sort(vec.begin(),vec.end());
      |                          ^~~
a.cc:28:15: error: request for member 'size' in 'vec', which is of non-class type 'int'
   28 |     rep(i,vec.size()){
      |               ^~~~
a.cc:31:7: error: expected ';' before 'n'
   31 |     ll n=codiv.size();
      |       ^~
      |       ;
a.cc:32:28: error: 'n' was not declared in this scope; did you mean 'yn'?
   32 |     vector<bitset<99> > bs(n);
      |                            ^
      |                            yn
a.cc:41:23: error: 'dfs' cannot be used as a function
   41 |     cout << ((n>0)?dfs(0,bs,bit,1):1) << endl;
      |                    ~~~^~~~~~~~~~~~