Language: C++

te<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
 
const ll MOD=1e9+7;
const ll INF=1e18;
const int MAX=510000;
const double pi=acos(-1);
int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,-1,1,1,-1};
// int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false); 
  
  int n;
  cin >> n;
  ll m;
  cin >> m;
  vector<ll>b(n);
  rep(i,n){
    cin >> b[i];
    b[i]/=2;
  }
  ll bi=b[0];
  rep(i,n){
    bi=lcm(bi,b[i]);
    if(bi>m){
      cout << 0 << endl;
      return 0;
    }
  }
  if(n==1){
    cout << (m/b[0]+1)/2 << endl;
    return 0;
  }
  else{
    ll cnt = 0;
    map<ll,ll>mp;
    rep(i,n){
      if(b[i]%2==0){
        mp[b[i]]++;
      }
      else continue;
    }
    if(mp.size()>1){
      cout << 0 << endl;
      return 0;
    }
    ll ans = m/bi;
    ans=(ans+1)/2;
    cout << ans << endl;
  }
  return 0;
}


Compiler output:
a.cc:1:1: error: 'te' does not name a type
    1 | te<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
      | ^~
a.cc:4:7: error: 'll' does not name a type
    4 | const ll MOD=1e9+7;
      |       ^~
a.cc:5:7: error: 'll' does not name a type
    5 | const ll INF=1e18;
      |       ^~
a.cc:7:17: error: 'acos' was not declared in this scope
    7 | const double pi=acos(-1);
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:13:3: error: 'cin' was not declared in this scope
   13 |   cin.tie(0);
      |   ^~~
a.cc:14:3: error: 'ios' has not been declared
   14 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:18:3: error: 'll' was not declared in this scope
   18 |   ll m;
      |   ^~
a.cc:19:10: error: 'm' was not declared in this scope
   19 |   cin >> m;
      |          ^
a.cc:20:3: error: 'vector' was not declared in this scope
   20 |   vector<ll>b(n);
      |   ^~~~~~
a.cc:20:13: error: 'b' was not declared in this scope
   20 |   vector<ll>b(n);
      |             ^
a.cc:21:7: error: 'i' was not declared in this scope
   21 |   rep(i,n){
      |       ^
a.cc:21:3: error: 'rep' was not declared in this scope
   21 |   rep(i,n){
      |   ^~~
a.cc:25:5: error: expected ';' before 'bi'
   25 |   ll bi=b[0];
      |     ^~~
      |     ;
a.cc:34:5: error: 'cout' was not declared in this scope
   34 |     cout << (m/b[0]+1)/2 << endl;
      |     ^~~~
a.cc:34:29: error: 'endl' was not declared in this scope
   34 |     cout << (m/b[0]+1)/2 << endl;
      |                             ^~~~
a.cc:38:7: error: expected ';' before 'cnt'
   38 |     ll cnt = 0;
      |       ^~~~
      |       ;
a.cc:39:5: error: 'map' was not declared in this scope
   39 |     map<ll,ll>mp;
      |     ^~~
a.cc:39:15: error: 'mp' was not declared in this scope
   39 |     map<ll,ll>mp;
      |               ^~
a.cc:47:7: error: 'cout' was not declared in this scope
   47 |       cout << 0 << endl;
      |       ^~~~
a.cc:47:20: error: 'endl' was not declared in this scope
   47 |       cout << 0 << endl;
      |                    ^~~~
a.cc:50:7: error: expected ';' before 'ans'
   50 |     ll ans = m/bi;
      |       ^~~~
      |       ;
a.cc:51:5: error: 'ans' was not declared in this scope
   51 |     ans=(ans+1)/2;
      |     ^~~
a.cc:52:5: error: 'cout' was not declared in this scope
   52 |     cout << ans << endl;
      |     ^~~~
a.cc:52:20: error: 'endl' was not declared in this scope
   52 |     cout << ans << endl;
      |                    ^~~~