Language: C++

#include <bits/stdc++.h>
#include <random>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)

using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using ull= unsigned long long;
const ll K_MAX=1e5+5;
const ll Lmax=ll(1e18);
const int Nmax=2e5+1;
const int Nd=61;
const int INF=1e5;

// GCD, LCM
// https://youtu.be/8lm8o8L9Bmw?t=2285
// https://youtu.be/XI8exXVxZ-Q?t=3595
// https://youtu.be/F2p_e6iKxnk?t=843
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;} //最大公約数
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;} //最小公倍数


vector<pair<long long, long long> > prime_factorize(long long N) {
    vector<pair<long long, long long> > res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}


int main(){
  ll n; cin>>n;
  vector<ll> a(n);
  bool pc=true, sc=true;
  ll sgcd;
  int temp;
  int minP=2;
  bool furui=false;
  ll ex=0;
  vector<bool> exist(1010101,false);
  rep(i,n){
    cin>>a[i];
    if(i==1){
      sgcd=gcd(a[0],a[1]);
    }
    if(i>1){
      sgcd=gcd(sgcd,a[i]);
    }
    temp=a[i];
    vector<pair<ll,ll>> res;
    furui=false;
    if(pc){
      for (ll k=minP; k*k<=temp;k++){
        if(temp%k!=0) continue;

        if(!furui){
          minP=min(minP,k);
          furui=true;
        }
        while(temp %k ==0){
          temp /=k;
        }

        if(exist[k]){
          pc=false;
        }else{
          exist[k]=true;
        }
      }


    }


  }

  if(pc){
    cout<<"pairwise coprime"<<endl;
    return 0;
  }

  if(sgcd==1){
    cout<<"setwise coprime"<<endl;
    return 0;

  }
  cout<<"not coprime"<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:19: error: no matching function for call to 'min(int&, ll&)'
   72 |           minP=min(minP,k);
      |                ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/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:72:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   72 |           minP=min(minP,k);
      |                ~~~^~~~~~~~
/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
In file included from /usr/include/c++/14/algorithm:61:
/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:72:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   72 |           minP=min(minP,k);
      |                ~~~^~~~~~~~