Language: C++

#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;
int hako[111111];
int main(void){
  long long int n,k;
  cin>>n>>k;
  int i;
  vector<long long int> a;
  long long int maxt,mint;
  maxt=0;
  mint=11111111111;
  int gu,ki;
  gu=0;

  for(i=0;i<n;i++){
    int t;
    cin>>t;
    maxt=max(maxt,t);
    mint=min(mint,t);
    a.push_back(t);
    if(t==k) gu=1;
  }
  if(maxt<k){
    cout<<"IMPOSSIBLE"<<endl;
    return 0;
  }
  if(gu==1){
    cout<<"POSSIBLE"<<endl;
    return 0;
  }
  bool flag=true;
  for(i=0;i<n;i++){
    if(a[i]%mint!=0) {
      flag=false;
      break;
    }
  }
  if(flag) cout<<"IMPOSSIBLE"<<endl;
  else cout<<"POSSIBLE"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: no matching function for call to 'max(long long int&, int&)'
   22 |     maxt=max(maxt,t);
      |          ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:22:13: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   22 |     maxt=max(maxt,t);
      |          ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:22:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   22 |     maxt=max(maxt,t);
      |          ~~~^~~~~~~~
a.cc:23:13: error: no matching function for call to 'min(long long int&, int&)'
   23 |     mint=min(mint,t);
      |          ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:23:13: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   23 |     mint=min(mint,t);
      |          ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:23:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   23 |     mint=min(mint,t);
      |          ~~~^~~~~~~~