criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int gcd(int a, int b)
{
	int m = b % a;
	return m == 0 ? a : gcd(m, a);
}

using namespace std;

int main(void)
{
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  int n;
  cin >> n;
  
  vector<int> num, set;
  num.resize(n);
  set.resize(n);
  
  for (int i = 0; i < n; i++) cin >> num[i];

  set[0] = num[0];
  for (int i = 1; i < n; i++)
	set[i] = gcd(set[i-1], num[i]);

  bool pairw = true;
  for (int i = 1; i < n; i++)
    for (int j = 0; j < il j++)
      if (gcd(num[i], num[j]) != 1)
  	  {
  	  	pairw = false;
  	  	goto endfor;
  	  }
  endfor: 
  if (pairw)
	  cout << "pairwise coprime";
  else if (set[n-1] == 1)
	  cout << "setwise coprime";
  else
	  cout << "no coprime";
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:25: error: 'il' was not declared in this scope; did you mean 'i'?
   35 |     for (int j = 0; j < il j++)
      |                         ^~
      |                         i
a.cc:35:27: error: expected ';' before 'j'
   35 |     for (int j = 0; j < il j++)
      |                           ^~
      |                           ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int euclid(int a, int b){
  if(a < b){
    int tmp = a;
    a = b;
    b = tmp;
  }

  if(a % b == 0) return b;
  return euclid(b, a % b);
}

int main(){
  int N;
  bool pairwise  = true;
  cin >> N;
  vector<int> count(1000000);
  int N_gcd = 1;
  for(int i = 0; i < N; i++){
    int a
    cin >> a;
    count.at(a)++;

    if(i == 0) N_gcd = A.at(0);
    else N_gcd = euclid(N_gcd, a);
  }

  for(int i = 2; i < 1000000; i++){
    int total = 0;
    for(int j = i; j < 1000000; j += i){
      total+= count.at(j);
    }
    if(total > 1){
      pairwise = false;
      break;
    }
  }

  if(pairwise) cout << "pairwise coprime" << endl;
  else if(N_gcd == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: expected initializer before 'cin'
   24 |     cin >> a;
      |     ^~~
a.cc:25:14: error: 'a' was not declared in this scope
   25 |     count.at(a)++;
      |              ^
a.cc:27:24: error: 'A' was not declared in this scope
   27 |     if(i == 0) N_gcd = A.at(0);
      |                        ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int euclid(int a, int b){
  if(a < b){
    int tmp = a;
    a = b;
    b = tmp;
  }

  if(a % b == 0) return b;
  return euclid(b, a % b);
}

int main(){
  int N;
  bool pairwise  = true;
  cin >> N;
  vector<int> A(N);
  vector<int> count(1000000);
  int N_gcd = 1;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
    count(A.at(i))++;

    if(i == 0) N_gcd = A.at(0);
    else N_gcd = euclid(N_gcd, A.at(i));
  }

  for(int i = 0; i < 1000000; i++){
    int total = 0;
    for(int j = i; j < 1000000; j += i){
      total+= count.at(j);
    }
    if(total > 1){
      pairwise = false;
      break;
    }
  }

  if(pairwise) cout << "pairwise coprime" << endl;
  else if(N_gcd == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   25 |     count(A.at(i))++;
      |     ~~~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int euclid(int a, int b){
  if(a < b){
    int tmp = a;
    a = b;
    b = tmp;
  }

  if(a % b == 0) return b;
  return euclid(b, a % b);
}

int main(){
  int N;
  bool pairwise  = true;
  cin >> N;
  vector<int> A(N);
  vector<int> count(1000000);
  int N_gcd = 1;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
    count(A.at(i))++;

    if(i == 0) N_gcd = A.at(0);
    else N_gcd = euclid(N_gcd, A.at(i));
  }

  for(i = 0; i < 1000000; i++){
    int total = 0;
    for(j = i; j < 1000000; j += i){
      total+= count.at(j);
    }
    if(total > 1){
      pairwise = false;
      break;
    }
  }

  if(pairwise) cout << "pairwise coprime" << endl;
  else if(N_gcd == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   25 |     count(A.at(i))++;
      |     ~~~~~^~~~~~~~~
a.cc:31:7: error: 'i' was not declared in this scope
   31 |   for(i = 0; i < 1000000; i++){
      |       ^
a.cc:33:9: error: 'j' was not declared in this scope
   33 |     for(j = i; j < 1000000; j += i){
      |         ^
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll n,a[1000005];
ll gcd(ll x,ll y)
{
	if(y==0)return x;
	return gcd(y,x%y);
}
ll lcm(ll x,ll y,ll g)
{
	return x/gcd(x,y)*y;
}
ll l[1000005],ls;
bool hash[1000005];
int main(){
	cin>>n;bool flag=1;
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		if(hash[a[i]])flag=0;
		else hash[a[i]]=1;
	}
	ls=0;l[0]=1;ll mx=1e6/2+3;
	for(int i=1;i<=n;i++)
	{
		for(int j=0;j<=ls;j++)
		{
			if(gcd(l[j],a[i])!=1)
			{
				flag=0;break;
			}
		}
		if(!flag)break;
		int gc=gcd(a[i],l[ls]);
		if(gc<mx)l[ls]=lcm(a[i],l[ls],gc);
		if(l[ls]>1e11){ls++;l[ls]=1;}
	}
	if(flag)
	{
		cout<<"pairwise coprime";return 0;
	}
	ll g=a[1];
	for(int i=2;i<=n;i++)
	{
		g=gcd(g,a[i]);
	}
	if(g==1)cout<<"setwise coprime";
	else cout<<"not coprime";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: reference to 'hash' is ambiguous
   21 |                 if(hash[a[i]])flag=0;
      |                    ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:15:6: note:                 'bool hash [1000005]'
   15 | bool hash[1000005];
      |      ^~~~
a.cc:22:22: error: reference to 'hash' is ambiguous
   22 |                 else hash[a[i]]=1;
      |                      ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:15:6: note:                 'bool hash [1000005]'
   15 | bool hash[1000005];
      |      ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORD(i,a,b) for(int i=a;i>=b;i--)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define en "\n"
#define ITER(i,a) for( typeof(a.begin()) i=a.begin();i!=a.end();i++)
#define mod 1000000007
#define mpp make_pair
#define mes(a,b) memset((a),(b),sizeof((a))
typedef map<int,int> MI;
typedef pair<int,int>   PI;
typedef vector<int> VI;
typedef long long int LL;

int main() {
	// your code goes here
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    long int n;
    cin>>n;
    long int a[n];
    for(long int i=0;i<n;i++)
    cin>>a[i];
    bool d=true;
    long int b[1000001]={0};
    for(long int i=0;i<n;i++)
    {
        for(long int j=2;j<=sqrt(a[i]);j++)
        {
            if(a[i]%j==0)
            {
               b[j]++;l];  
               if(j*j!=a[i])
               {
                 b[a[i]/j]++;
               }
            }
            
            if(b[j]>=2 || b[a[i]/j]>=2)
            {
                d=false;
                break;
            }
        }
        if(a[i]>1)
        b[a[i]]++;
        if(b[a[i]]>=2)
        {
            d=false;
            break;
        }
    }
    for(long int i=2;i<1000001;i++)
    {
        if(b[i]>=2)
        {
            d=false;
            break;
        }
    }
    if(d==true)
    cout<<"pairwise coprime"<<en;
    else
    {
        long  int g=a[0];
        for(long int i=1;i<n;i++)
        {
            g=__gcd(a[i],g);
           /// cout<<g<<en;
        }
        //cout<<g<<en;
        if(g==1)
        cout<<"setwise coprime"<<en;
        else
        cout<<"not coprime"<<en;
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:23: error: 'l' was not declared in this scope
   35 |                b[j]++;l];
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORD(i,a,b) for(int i=a;i>=b;i--)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define en "\n"
#define ITER(i,a) for( typeof(a.begin()) i=a.begin();i!=a.end();i++)
#define mod 1000000007
#define mpp make_pair
#define mes(a,b) memset((a),(b),sizeof((a))
typedef map<int,int> MI;
typedef pair<int,int>   PI;
typedef vector<int> VI;
typedef long long int LL;

int main() {
	// your code goes here
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    long int n;
    cin>>n;
    long int a[n];
    for(long int i=0;i<n;i++)
    cin>>a[i];
    bool d=true;
    long int b[1000001]={0};
    for(long int i=0;i<n;i++)
    {
        for(long int j=2;j<=sqrt(a[i]);j++)
        {
            if(a[i]%j==0)
            {
               b[j]++;
               if(b[j]>=2)
               {
                   d=false;
                   break;
               }
               if(j*j!=a[i])
               {
                 b[a[i]/j]++; 
                 if(b[a[i]/j]>=2)
               {
                   d=false;
                   break;
               }
               }
            }
        }
        b[a[i]]++;
        if(b[a[i]]>=2)
        {
            d=false;
            break;
        }
    }
    
    for(long int i=2;i<1000001;i++)
    {
        if(b[i]>=2)
        {
            d=false;
            break;
        }
    }
    if(d==true)
    cout<<"pairwise coprime"<<en;
    else
    {
        int g=a[0];
        for(long int i=1;i<n;i++)
        {
            g=__gcd(a[i],g);
           /// cout<<g<<en;
        }
        //cout<<g<<en;
        if(g==1)
        cout<<"setwise coprime"<<en;
        else
        cout<<"not coprime"<<en;
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:20: error: no matching function for call to '__gcd(long int&, int&)'
   75 |             g=__gcd(a[i],g);
      |               ~~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:75:20: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long int' and 'int')
   75 |             g=__gcd(a[i],g);
      |               ~~~~~^~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#define mod 1000000007
#define eps 1e-6
#define ll long long
#define INF 0x3f3f3f3f
#define MEM(x,y) memset(x,y,sizeof(x))
#define pb push_back
#define mk make_pair
#define pi pair<int, int>
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i,a,b) for(int i=a;i>=(b);--i)
using namespace std;
int dt[][2]= {{1,0},{-1,0},{0,1},{0,-1},{0,0}};
//typedef pair<int, int> P;
//priority_queue<int, vector<int>, greater<int> > q;

constexpr int N = 1e6+6;
int n;
int cnt[N];

int n,a,d,cnt[1000003],maxa=-(1<<30);

void fenjie(int x)
{
    for(int i=2;i*i<=x;++i)
    {
        if(x%i == 0)
        {
            ++cnt[i];//因子含有i的数有cnt[i]个
            while(x%i == 0)x/=i;
        }
    }
    if(x > 1) ++cnt[x];
}


int main()
{
   //IOS;
   int n;
   int a;
   scanf("%d%d",&n,&a);
   int k = a;
   int mxa = 0;
   rep(i,2,n)
   {
       scanf("%d",&a);
       mxa = max(mxa,a);
       k = __gcd(k,a);
       fenjie(a);
   }
   bool p1 = 1;
   rep(i,2,mxa)
   {
       if(cnt[i] >= 2)
       {
           p1 = 0;
           break;//说明不是两两互质了
       }
   }
   if(p1)puts("pairwise coprime");
   else if(p1 == 0 && k == 1) puts("setwise coprime");
   else puts("not coprime");
}


Compiler output:
a.cc:36:5: error: redefinition of 'int n'
   36 | int n,a,d,cnt[1000003],maxa=-(1<<30);
      |     ^
a.cc:33:5: note: 'int n' previously declared here
   33 | int n;
      |     ^
a.cc:36:11: error: conflicting declaration 'int cnt [1000003]'
   36 | int n,a,d,cnt[1000003],maxa=-(1<<30);
      |           ^~~
a.cc:34:5: note: previous declaration as 'int cnt [1000006]'
   34 | int cnt[N];
      |     ^~~
Language: C++

#include <bits/stdc++.h>
#define ll long long 
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1; 
    for(int T = 0; T < t ; T++){
        ll n;
        cin >> n;A
        ll a[n], cnt[10000001] = {0};
        for(int i = 0 ; i < n ; i++){
            cin >> a[i];
            cnt[a[i]]++;
        }
        bool ok = true;
        for(ll i = 2; i <= 1e6; i++){
            ll ans = 0;
            for(ll j = i; j <= 1e6; j += i){
                ans += cnt[j];
            }
            if(ans > 1){
                ok = false;
                break;
            }
        }
        if(ok == true)
            cout << "pairwise coprime" << endl;
        else{
            ll gh = a[0];
            for(int i = 1; i < n; i++)
                gh = __gcd(gh, a[i]);
            if(gh == 1)
                cout << "setwise coprime" << endl;
            else
                cout << "not coprime" << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'A' was not declared in this scope
   11 |         cin >> n;A
      |                  ^
a.cc:14:20: error: 'a' was not declared in this scope
   14 |             cin >> a[i];
      |                    ^
a.cc:15:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   15 |             cnt[a[i]]++;
      |             ^~~
      |             int
a.cc:21:24: error: 'cnt' was not declared in this scope; did you mean 'int'?
   21 |                 ans += cnt[j];
      |                        ^~~
      |                        int
a.cc:31:21: error: 'a' was not declared in this scope
   31 |             ll gh = a[0];
      |                     ^
Language: C++

#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#define mod 1000000007
#define eps 1e-6
#define ll long long
#define INF 0x3f3f3f3f
#define MEM(x,y) memset(x,y,sizeof(x))
#define pb push_back
#define mk make_pair
#define pi pair<int, int>
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i,a,b) for(int i=a;i>=(b);--i)
using namespace std;
int dt[][2]= {{1,0},{-1,0},{0,1},{0,-1},{0,0}};
//typedef pair<int, int> P;
//priority_queue<int, vector<int>, greater<int> > q;

// constexpr int N = 1e6+6;
// int n;
// int cnt[N];

int n,a,d,t[1000003],maxa=-(1<<30);

void fenjie(int x)
{
    for(int i=2;i*i<=x;++i)
    {
        if(x%i == 0)
        {
            ++cnt[i];//因子含有i的数有cnt[i]个
        }
    }
    if(x > 1) ++cnt[x];
}

// int main()
// {
//    //IOS;
//    int n;
//    int a;
//    scanf("%d%d",&n,&a);
//    int k = a;
//    int mxa = 0;
//    rep(i,2,n)
//    {
//        scanf("%d",&a);
//        mxa = max(mxa,a);
//        k = __gcd(k,a);
//        fenjie(a);
//    }
//    bool p1 = 1;
//    rep(i,2,mxa)
//    {
//        if(cnt[i] >= 2)
//        {
//            p1 = 0;
//            break;//说明不是两两互质了
//        }
//    }
//    if(p1)puts("pairwise coprime");
//    else if(p1 == 0 && k == 1) puts("setwise coprime");
//    else puts("not coprime");
// }
int main(){
    scanf("%d%d",&n,&a);
    d=a;//d初始值为a
    for(int i=2;i<=n;i++){
        scanf("%d",&a);
        if(maxa<a) maxa=a;//更新maxa
        d=__gcd(d,a);//求n个数的公因数可以这么做
        fenjie(a);//对a分解质因数
    }
    if(d==1){
        for(int i=2;i<=maxa;i++)
            if(t[i]>1) return puts("setwise coprime"),0;
            //t[i]>1说明有几个数有相同的因子，则肯定有一对数不互质
        return puts("pairwise coprime"),0;
    }
    else return puts("not coprime"),0;
    return 0;
}


Compiler output:
a.cc: In function 'void fenjie(int)':
a.cc:44:15: error: 'cnt' was not declared in this scope; did you mean 'int'?
   44 |             ++cnt[i];//因子含有i的数有cnt[i]个
      |               ^~~
      |               int
a.cc:47:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   47 |     if(x > 1) ++cnt[x];
      |                 ^~~
      |                 int
Language: C++

#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <sstream>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#define mod 1000000007
#define eps 1e-6
#define ll long long
#define INF 0x3f3f3f3f
#define MEM(x,y) memset(x,y,sizeof(x))
#define pb push_back
#define mk make_pair
#define pi pair<int, int>
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i,a,b) for(int i=a;i>=(b);--i)
using namespace std;
int dt[][2]= {{1,0},{-1,0},{0,1},{0,-1},{0,0}};
//typedef pair<int, int> P;
//priority_queue<int, vector<int>, greater<int> > q;

constexpr int N = 1e6+6;
int n;
int cnt[N];

int n,a,d,t[1000003],maxa=-(1<<30);

void fenjie(int x)
{
    for(int i=2;i*i<=x;++i)
    {
        if(x%i == 0)
        {
            ++cnt[i];//因子含有i的数有cnt[i]个
        }
    }
    if(x > 1) ++cnt[x];
}

// int main()
// {
//    //IOS;
//    int n;
//    int a;
//    scanf("%d%d",&n,&a);
//    int k = a;
//    int mxa = 0;
//    rep(i,2,n)
//    {
//        scanf("%d",&a);
//        mxa = max(mxa,a);
//        k = __gcd(k,a);
//        fenjie(a);
//    }
//    bool p1 = 1;
//    rep(i,2,mxa)
//    {
//        if(cnt[i] >= 2)
//        {
//            p1 = 0;
//            break;//说明不是两两互质了
//        }
//    }
//    if(p1)puts("pairwise coprime");
//    else if(p1 == 0 && k == 1) puts("setwise coprime");
//    else puts("not coprime");
// }
int main(){
    scanf("%d%d",&n,&a);
    d=a;//d初始值为a
    for(int i=2;i<=n;i++){
        scanf("%d",&a);
        if(maxa<a) maxa=a;//更新maxa
        d=__gcd(d,a);//求n个数的公因数可以这么做
        fenjie(a);//对a分解质因数
    }
    if(d==1){
        for(int i=2;i<=maxa;i++)
            if(t[i]>1) return puts("setwise coprime"),0;
            //t[i]>1说明有几个数有相同的因子，则肯定有一对数不互质
        return puts("pairwise coprime"),0;
    }
    else return puts("not coprime"),0;
    return 0;
}


Compiler output:
a.cc:36:5: error: redefinition of 'int n'
   36 | int n,a,d,t[1000003],maxa=-(1<<30);
      |     ^
a.cc:33:5: note: 'int n' previously declared here
   33 | int n;
      |     ^
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
 
#include <bits/stdc++.h>
#include <fstream>
#include<string.h>
#include <algorithm>
#include<math.h>
#include<vector>
#include <queue>
#include <deque> 
#define ll long double
#define M 1000000007 
#define MM 998244353
#define INF (1LL<<60)-1
using namespace std;
 
 
int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
        int n,i,j,k;
        cin>>n;
        ll a[n];
        ll prod=1;
        for(i=0;i<n;i++)
        {
            cin>>a[i];
            prod*=a[i];
        }
        ll gd=a[0],lm=a[0];
        for(i=1;i<n;i++)
        {
            gd=__gcd(gd,a[i]);
            lm=(lm*a[i])/__gcd(a[i],lm);
        }
        if(gd!=1)cout<<"not coprime\n";
        else if(lm!=prod)cout<<"setwise coprime\n";
        else cout<<"pairwise coprime\n";
        /*tcitr++;
    }*/
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement) [with _EuclideanRingElement = long double]':
a.cc:37:21:   required from here
   37 |             gd=__gcd(gd,a[i]);
      |                ~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1141:43: error: invalid operands of types 'long double' and 'long double' to binary 'operator%'
 1141 |           _EuclideanRingElement __t = __m % __n;
      |                                       ~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef vector<double> Vec;
typedef vector<Vec> Mat;
typedef pair<ll,ll> P;
typedef pair<double,ll> Pd;
typedef pair<double,double> PD;
typedef priority_queue<P,vector<P>,greater<P> > P_queue;
typedef priority_queue<Pd,vector<Pd>,greater<Pd> > Pd_queue;

const ll MOD=998244353;
const ll mod=1000000007;
const ll INF=1e15;
const double DEL=1e-6;

#define _GLIBCXX_DEBUG
#define REP(i,a,b) for(int i=(int)a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define ALL(a) a.begin(),a.end()
#define SORT(a) sort(ALL(a))
#define U_ERASE(V) V.erase(unique(ALL(V)), V.end());

ll yaku(ll a, ll b){
    if(a>b) return yaku(b,a);
    return b%a ? yaku(b%a,a) : a;
}


vec Sosu;
void Eratosthenes(ll N, vec &ret){
    vector<bool> a(N+1,true);
    a.at(0)=false;
    a.at(1)=false;
    REP(i,2,N+1){
        if(a.at(i)) for(ll k=2*i;k<=N;k+=i) a.at(k)=false;
    }
    rep(i,N+1) if(a.at(i)) ret.pb(i);
    return;
}

void init(ll N){
    ll BIG=N,SMALL=0;
    while(BIG>SMALL+1){
        ll MID=(BIG+SMALL)/2;
        if(MID*MID>=N) BIG=MID;
        else SMALL=MID;
    }
    //cout<<"era"<<N<<' '<<BIG+3<<endl;
    Eratosthenes(BIG+100,Sosu);
}

const ll MAXN=1000010;

bool Toku(vector<bool> & used, ll m){
    if(N==1) return true;
    ll N=m;
    for(int i=0;Sosu.at(i)*Sosu.at(i)<=m;i++){
        ll k=Sosu.at(i);
        ll count=0;
        while(true){
            if(N%k!=0) break;
            count++;
            N/=k;
        }
        if(count!=0) {
            if(used[k]) return false;
            else used[k]=true;
        }
    }
    if(used[N]) return false;
    used[N]=true;
    return true;

}

string Solve(){
    ll N; cin>>N;
    vec d(N); rep(i,N) cin>>d[i];
    ll memo=d[0];
    REP(i,1,N) {
        memo=yaku(d[i],memo);
        if(memo==1) break;
    }
    if(memo>1) return "not coprime";

    init(MAXN);
    //rep(i,Sosu.size()) cout<<Sosu[i]<<endl;
    vector<bool> used(MAXN,false);
    rep(i,N) if(!Toku(used,d[i])) return "setwise coprime";
    return "pairwise coprime";
}

int main(){
    cout<<Solve()<<endl;
}


Compiler output:
a.cc: In function 'bool Toku(std::vector<bool>&, ll)':
a.cc:61:8: error: 'N' was not declared in this scope
   61 |     if(N==1) return true;
      |        ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <array>
#include <bitset>
#define rep(i,r) for(int i = 0; i < (r); i++)
#define pb push_back
#define all(a) a.begin(), a.end()
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define int long long
#define uint unsigned long long
#define endl '\n'
using namespace std;

const int mn = 1e6 + 10;
int n;
int a[mn];

int gcd(int a, int b) {
    return a % b ? gcd(b , a % b) : b;
}

signed main() {
    fastio;
    cin >> n;
    rep (i, n) {
        cin >> a[i];
    }

    set<int> st, temp; // set of all factors
    int g = a[0];
    temp = f(g);
    for (auto t : temp) {
        st.insert(t);
    }

    bool pairwise = true;
    for (int i = 1; i < n; i++) {
        temp.clear();
        int ai = a[i];
        // check for setwise coprime
        g = gcd(g, ai);

        // factorize ai
        for (int i = 2; i * i <= ai; i++) {
            if (ai % i == 0) {
                temp.insert(i);
                while (ai % i == 0) 
                    ai /= i; 
            }
        }


        // check for pairwise coprime and update cache
        for (auto& t : temp) {
            if (st.count(t)) {
                pairwise = false;
            }
            st.insert(t);
        }

        // update cache of all prime factors seen so far
        // cerr << "gcd: " << g << endl;
    }

    if (pairwise) {
        cout << "pairwise coprime" << endl;
    }
    else if (g == 1) {
        cout << "setwise coprime" << endl;
    }
    else {
        cout << "not coprime" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:12: error: 'f' was not declared in this scope
   47 |     temp = f(g);
      |            ^
Language: C

// SPDX-License-Identifier: X11
// 2020-08-30
// Coprime (500pt)

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

#define MAX 1000005

#define u32 uint_fast32_t

bool *erato(u32 bound);

int main() {
  u32 N;
  scanf("%lu\n", &N);

  bool *ps = erato(MAX);
  u32 *pa = calloc(MAX, sizeof(u32));

  bool s = 1;
  bool p = 1;

  uint_fast8_t s;
  u32 A, i, j;
  for (i = 0; i < N - 1; ++i) {
    scanf("%lu", &A);

    if (ps[A]) {
      pa[A]++;
      continue;
    }

    if (!(A & 1)) {
      if (pa[2]) {
        p = 0;
      }
      pa[2]++;
    }

    if (!(A % 3)) {
      if (pa[3])
        p = 0;
      pa[3]++;
    }

    for (j = 5, s = 2; j * j <= A; j += s, s = 6 - s)
      if (!(A % j)) {
        if (pa[j])
          p = 0;
        pa[j]++;
      }
  }

  scanf("%lu", &A);

  if (ps[A]) {
    pa[A]++;
    if (pa[A] == N)
      s = 0;
  }

  if (!(A & 1)) {
    if (pa[2]) {
      p = 0;
    }
    pa[2]++;
    if (pa[2] == N)
      s = 0;
  }

  if (!(A % 3)) {
    if (pa[3])
      p = 0;
    pa[3]++;
    if (pa[3] == N)
      s = 0;
  }

  for (i = 5, s = 2; i * i <= A; i += s, s = 6 - s)
    if (!(A % j)) {
      if (pa[j])
        p = 0;
      pa[j]++;
      if (pa[j] == N)
        s = 0;
    }

  if (p)
    printf("pairwise coprime\n");
  else if (s)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");

  free(ps);
  free(pa);
}

bool *erato(u32 bound) {
  if (!bound)
    return NULL;

  bool *array = calloc(bound, sizeof(bool));
  u32 i,j;
  uint_fast8_t s,ss;

  if (bound < 3)
    return array;
  array[2] = 1;

  if (bound < 4)
    return array;
  array[3] = 1;

  if (bound < 5)
    return array;

  for (i = 5, s = 2; i < bound; i += s, s = 6 - s)
    array[i] = 1;

  for (i = 5, s = 2; i < bound; i += s, s = 6 - s)
    if (array[i])
      for (j = i, ss = s; i * j < bound; j += ss, ss = 6 - ss)
        array[i * j] = 0;

  return array;
}


Compiler output:
main.c: In function 'main':
main.c:27:16: error: conflicting types for 's'; have 'uint_fast8_t' {aka 'unsigned char'}
   27 |   uint_fast8_t s;
      |                ^
main.c:24:8: note: previous definition of 's' with type '_Bool'
   24 |   bool s = 1;
      |        ^
Language: C

// SPDX-License-Identifier: X11
// 2020-08-30
// Coprime (500pt)

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

#define MAX 1000005

#define u32 uint_fast32_t

struct ll {
  u32 a;
  struct ll *next;
};

bool *erato(u32 bound);
u32 foldgcd(struct ll *node, u32 base);
struct ll *prepend(u32 a, struct ll *head);
void freelist(struct ll *head);

int main() {
  u32 N;
  scanf("%lu\n", &N);

  bool *ps = erato(MAX);
  bool *pa = calloc(MAX, sizeof(bool));

  bool set = 0;
  bool p = 1;

  uint_fast8_t s;
  u32 A, i, j;
  scanf("%lu", &A);

  struct ll *list = (struct ll *) malloc(sizeof(struct ll));
  list->a = A;
  list->next = NULL;

  if (!(A & 1))
    pa[2] = 1;
  if (!(A % 3))
    pa[3] = 1;
  for (i = 5, s = 2; i < N; i += s, s = 6 - s)
    if (ps[i] && !(A % i))
      pa[i] = 1;

  for (i = 1; i < N; ++i) {
    scanf("%lu", &A);
    list = prepend(A, list);

    if (ps[A]) {
      set = 1;
      continue;
    }

    if (!(A & 1)) {
      if (pa[2]) {
        p = 0;
      }
      else {
        pa[2] = 1;
      }
    }

    if (!(A % 3)) {
      if (pa[3]) {
        p = 0;
      }
      else {
        pa[3] = 1;
      }
    }

    for (j = 5, s = 2; j * j <= A; j += s, s = 6 - s) {
      if (!(A % j)) {
        if (pa[j]) {
          p = 0;
        }
        else {
          pa[j] = 1;
        }
      }
    }
  }

  if (p)
    printf("pairwise coprime\n");
  else if (set || foldgcd(list->next, list->a) == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");

  freelist(list);
  free(ps);
  free(pa);
}

u32 gcd(u32 a, u32 b) {
  return b == 0 ? a : gcd(b, a % b);
}

bool *erato(u32 bound) {
  if (!bound)
    return NULL;

  bool *array = calloc(bound, sizeof(bool));
  u32 i,j;
  u8 s,ss;

  if (bound < 3)
    return array;
  array[2] = 1;

  if (bound < 4)
    return array;
  array[3] = 1;

  if (bound < 5)
    return array;

  for (i = 5, s = 2; i < bound; i += s, s = 6 - s)
    array[i] = 1;

  for (i = 5, s = 2; i < bound; i += s, s = 6 - s)
    if (array[i])
      for (j = i, ss = s; i * j < bound; j += ss, ss = 6 - ss)
        array[i * j] = 0;

  return array;
}

struct ll *prepend(u32 a, struct ll *head) {
  struct ll *new = (struct ll *) malloc(sizeof(struct ll));
  new->a = a;
  new->next = head;
  return new;
}
@
void freelist(struct ll* head) {
  struct ll* tmp;
  while (head != NULL) {
    tmp = head;
    head = head->next;
    free(tmp);
  }
}

u32 foldgcd(struct ll *node, u32 base) {
  u32 x = gcd(base, node->a);
  if (x == 1 || node->next == NULL)
    return x;
  else
    return foldgcd(node->next, x);
}


Compiler output:
main.c: In function 'erato':
main.c:112:3: error: unknown type name 'u8'
  112 |   u8 s,ss;
      |   ^~
main.c: At top level:
main.c:142:1: error: stray '@' in program
  142 | @
      | ^
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;} //最小公倍数

int main(){
  ll n; cin>>n;
  vector<ll> a(n);
  bool pc=true;
  ll sgcd=1;
  ll temp;
  ll minP=2;
  bool furui=false;
  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];
    furui=false;
    if(pc){
      for (ll k=2; k*k<=temp;k++){
        if(temp%k!=0) continue;

        while(temp %k ==0){
          temp /=k;
        }

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

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

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

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



}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:2: error: expected '}' at end of input
   75 | }
      |  ^
a.cc:23:11: note: to match this '{'
   23 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
vector<int> sieve(int max) {
    vector<bool>prime(max + 1, true);
    vector<int>A;
    for (int i = 2; i<= max; ++i)
        if (prime[i]) {
            A.push_back(i);
            for (int j = 2; i * j <= max; ++j)
                prime[i * j] = false;
        }
    return A;
}
map<int, int>B;
bool END = false;
signed main() {
    vector<int>prime = sieve(1000000);
    int N; 
    cin >> N;
    vector<int>A(N);
    int count = 0;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        if (i == 0)count = A[i];
        count = gcd(count, A[i]);
    }
    if (count != 1) {
        puts("not coprime");
        return 0;
    }
    for(int i=0;i<N;i++){
        int X = A[i];
        for (int a : prime) {
            if(a > A[i]*A[i]) {
                break;
            }
        if (X % a != 0) continue;
        while (X % a == 0)X /= a;
        if(B[a]>0){
          puts("setwise coprime");
                  return 0;
        }
        }
        B[a]++;          
    }
    puts("pairwise coprime");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:11: error: 'a' was not declared in this scope
   45 |         B[a]++;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
vector<int> sieve(int max) {
    vector<bool>prime(max + 1, true);
    vector<int>A;
    for (int i = 2; i<= max; ++i)
        if (prime[i]) {
            A.push_back(i);
            for (int j = 2; i * j <= max; ++j)
                prime[i * j] = false;
        }
    return A;
}
map<int, int>B;
bool END = false;
signed main() {
    vector<int>prime = sieve(1000000);
    int N; 
    cin >> N;
    vector<int>A(N);
    int count = 0;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        if (i == 0)count = A[i];
        count = gcd(count, A[i]);
    }
    if (count != 1) {
        puts("not coprime");
        return 0;
    }
    for(int i=0;i<N;i++){
        int X = A[i];
        for (int a : prime) {
            if(a > A[i]*A[i]) {
                break;
            }
        }
        if (X % a != 0) continue;
        while (X % a == 0)X /= a;
        if(B[a]>0){
          puts("setwise coprime");
                  return 0
        }
        B[a]++;          
    }
    puts("pairwise coprime");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:17: error: 'a' was not declared in this scope
   39 |         if (X % a != 0) continue;
      |                 ^
a.cc:40:20: error: 'a' was not declared in this scope
   40 |         while (X % a == 0)X /= a;
      |                    ^
a.cc:41:14: error: 'a' was not declared in this scope
   41 |         if(B[a]>0){
      |              ^
a.cc:43:27: error: expected ';' before '}' token
   43 |                   return 0
      |                           ^
      |                           ;
   44 |         }
      |         ~                  
a.cc:45:11: error: 'a' was not declared in this scope
   45 |         B[a]++;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int max) {
    vector<bool>prime(max + 1, true);
    vector<int>A;
    for (int i = 2; i<= max; ++i)
        if (prime[i]) {
            A.push_back(i);
            for (int j = 2; i * j <= max; ++j)
                prime[i * j] = false;
        }
    return A;
}
map<int, int>B;
bool END = false;
void prime_factorize(vector<int>& prime, long long N) {
    for (int a : prime) {
        if(a > N) {
            break;
        }
        if (N % a != 0) continue;
        while (N % a == 0)N /= a;
        if(B[a]>0){puts("setwise coprime");END = true;return;}
        B[a]++;
    }
}
int main() {
    vector<int>prime = sieve(1000000);
    int N; 
    cin >> N;
    vector<int>A(N);
    int count = 0;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        if (i == 0)count = A[i];
        count = gcd(count, A[i]);
    }
    if (count != 1) {
        puts("not coprime");
        return 0;
    }
    for(int i=0;i<N;i++){prime_factorize(prime, B, A[i]);if(END)return 0;}
    puts("pairwise coprime");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:49: error: cannot convert 'std::map<int, int>' to 'long long int'
   42 |     for(int i=0;i<N;i++){prime_factorize(prime, B, A[i]);if(END)return 0;}
      |                                                 ^
      |                                                 |
      |                                                 std::map<int, int>
a.cc:16:52: note:   initializing argument 2 of 'void prime_factorize(std::vector<int>&, long long int)'
   16 | void prime_factorize(vector<int>& prime, long long N) {
      |                                          ~~~~~~~~~~^
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int max) {
    vector<bool>prime(max + 1, true);
    vector<int>A;
    for (int i = 2; i<= max; ++i)
        if (prime[i]) {
            A.push_back(i);
            for (int j = 2; i * j <= max; ++j)
                prime[i * j] = false;
        }
    return A;
}
map<int, int>B;
bool END = false;
void prime_factorize(vector<int>& prime, long long N) {
    for (int a : prime) {
        if(a > N) {
            break;
        }
        if (N % a != 0) continue;
        while (N % a == 0)N /= a;
        if(B[a]>0){puts("setwise coprime");END = true;return;}
        B[a]++;
    }
}
int main() {
    vector<int>prime = sieve(1000000);
    int N; 
    cin >> N;
    vector<int>A(N);
    int count = 0;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        if (i == 0)count = A[i];
        count = gcd(count, A[i]);
    }
    if (count != 1) {
        puts("not coprime");
        return 0;
    }
    for(int i=0;i<N;i++){prime_factorize(prime, B, A[i],b);if(END)return 0;}
    puts("pairwise coprime");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:57: error: 'b' was not declared in this scope
   42 |     for(int i=0;i<N;i++){prime_factorize(prime, B, A[i],b);if(END)return 0;}
      |                                                         ^
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
typedef long long  ll;
//ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a;}
#define N 1000010
const int A = 1000005;
int main()
{
    int n; cin >> n;
    vector<int> a(n);
    vector<int> c(A);
   for(int i=0; i<n; i++){
       cin >> a[i];
       c[a[i]]++;
   }

   bool pairwize = true;
   for(int i=2; i<A; i++){
       int cnt = 0;
       for(int j=i; j<A; j += i){
           cnt += c[j];
       }
       if(cnt > 1) pairwize = false;
   }
   if(pairwize){
       cout << "pairwise coprime" << endl; 
       return 0;
   }

   int g = 0;
   for(int i=0; i<n; i++) g = gcd(g, a[i]);
   if(g==1) { 
       cout << "setwize coprime" << endl; 
       return 0;
   }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:33:31: error: 'gcd' was not declared in this scope
   33 |    for(int i=0; i<n; i++) g = gcd(g, a[i]);
      |                               ^~~
Language: C++

/*******************************************************************
 * 		Author : yash1402_										   *
 ******************************************************************/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
typedef vector<bool> vb;

vb prime(10e6+1);

void solve() {
	int n;
	cin >> n;
	vi v(n);
	for(auto &i:v) cin >> i;
	string ans = "pairwise coprime";
	
	int mp[10e6+1] = {0};
	
	for(int i=0;i<n;i++) {
		for(int j=2;j*j<=v[i];j++) {
			if(v[i]%j==0) {
				mp[j]++;
				if(mp[j] >= 2) {
					ans = "setwise coprime";
				}
				if(mp[j] >= n) {
					ans = "not coprime";
					break;
				}
			}
		}
	}
	
	cout << ans << "\n";
	
	
}

int main() {
	ll T=1;
	//cin >> T;
	
	//cout << "seieve started" << endl;
	fill(prime.begin(),prime.end(),true);
	prime[0] = prime[1] = true;
	for(int i=2;i*i<=10e6;i++) {
		for(int j=i*i;j<=10e6;j+=i) {
			prime[j] = false;
		}
	}
	//cout << "seieve ended" << endl;
	
	//for(int i=0;i<=100;i++) {
		//if(prime[i]) cout << i << " ";
	//}
	
	//cout << endl;
	
	while(T--) {
		solve();
	}
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:26:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   26 |         int mp[10e6+1] = {0};
      |                ~~~~^~
a.cc:26:20: error: could not convert '(1.0e+7 + (double)1)' from 'double' to 'long unsigned int'
   26 |         int mp[10e6+1] = {0};
      |                ~~~~^~
      |                    |
      |                    double
a.cc:26:20: error: size of array 'mp' has non-integral type 'double'
Language: C++

#include<bits/stdc++.h>
 
using namespace std;

#define ull unsigned long long
#define ll long long
#define MOD 1000000007
#define INF (ll)1e18
#define IINF (int)1e9
#define EPS 1e-9
/*
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    No personality
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*/
void solve(){
    ll n,x,ans=1;
    //string s,t;
    cin>>n;
    vector<ll> v;
	for(int i=0;i<n;i++){
		cin>>x;
        v.pb(x);
        ans = ans*x; 
	}
	int f=0;
    for(int i=0;i<n;i++){
        ll tem = ans/v[i];
        if(__gcd(tem,v[i])!=1){
            f=1;
            break;
        }
    }
    ans = v[0];
    if(f==0){ cout<<"pairwise coprime"; return; }
    for(int i=0;i<n;i++){
        ans = __gcd(ans,v[i]);
    }
    if(ans==1) cout<<"setwise coprime";
    else cout<<"not coprime";
    
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:23:11: error: 'class std::vector<long long int>' has no member named 'pb'
   23 |         v.pb(x);
      |           ^~
Language: C++

#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
// int a[100010],n,j;
bool ok=false;
int gcd(int a,int b)
{
    if(a==0)
        return b;
    else
        return gcd(b%a,a);
}
void factor(int number,long long fact[])
{
   if(ok==true)
            return;
        for(int i=1;i*i<=x;i++){
            if(x%i==0){
                int a=i;
                int b=x/i;
                if(a==b){
                    a=i;
                    b=1;
                }
                if(a!=1){
                    if(fact[a]){
                        ok=true;
                        return;
                    }
                    fact[a]++;
                }
                if(b!=1){
                    if(fact[b]){
                        ok=true;
                        return;
                    }
                    fact[b]++;
                }
            }
        }
}
int main()
{
    int n;
    cin>>n;
    int a[n];
    //cin >> a[i];
    for(int i=0;i<n;i++)
        cin >> a[i];
    int totalgcd=a[0];
    long long fact[1000001]={0};
   //factor(a[0],fact);
    for(int i=1;i<n;i++)
    {
        totalgcd=__gcd(totalgcd,a[i]);
      // factor(a[i],fact);
    }
  fact[1]=1;
    for(int i=0;i<n;i++)
        factor(a[i],fact);
  
   //int ispairwise=1;
   // for(int i=0;i<n;i++)
   // {
   //   if(fact[a[i]]>1){ispairwise=0;break;}
   // }
   if(!ok)
   {
    cout <<"pairwise coprime" << endl;
   }
else if(totalgcd==1)
     cout <<"setwise coprime" << endl;
   else
     cout <<"not coprime" << endl;
}

Compiler output:
a.cc: In function 'void factor(int, long long int*)':
a.cc:17:26: error: 'x' was not declared in this scope
   17 |         for(int i=1;i*i<=x;i++){
      |                          ^
Language: C++

#ifndef LOCAL
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#endif
#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
#define sim template < class c
#define int long long
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << '\n'; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);
typedef tree< pair<int,int>, null_type, less<pair<int,int> >, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef long long ll;
const ll MOD = 1e9 + 7 ;
const ll N = 1e6 + 10 ;
const ll INF = 1e18 + 10 ;
signed main(){
    fastio
    int n ;
    cin >> n ;
    vector<int> v(n) ;
    vector<int> flag(N) ;
    bool pairwise = true ;
    for(int i = 0; i < n; i++){
        cin >> v[i] ;
        flag[v[i]]++;
        if ( flag[v[i]] > 1 && v[i] != 1) {
            pairwise = false ;
        }
    }
    int gcd = v[0] ;
    for(int i = 1; i < n; i++){
        gcd = __gcd(gcd, v[i]) ;
    }
    vector<bool> c(N, false) ;
    for(int i = 2; < N; i++){
        if ( c[i] == false ) {
            int cnt = 0 ; 
            for(int j = i + i; j < N; j += i){
                c[j] = true ;
                if ( flag[j] ) cnt++ ;
            }
            if ( cnt > 1 ) {
                pairwise = false ;
                break ;
            }
        }
    }
    if ( pairwise ) {
        cout << "pairwise coprime" << endl;
    }
    else if ( gcd == 1 ) {
        cout << "setwise coprime" << endl;
    }
    else{
        cout << "no coprime" << endl;
    }
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:20: error: expected primary-expression before '<' token
   66 |     for(int i = 2; < N; i++){
      |                    ^
Language: C++

#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
 
#define pll              pair <long long,long long>
#define pb               push_back
#define ll               long long
#define ff               first
#define ss               second
#define D(x)             cerr<<#x " = "<<(x)<<endl
#define vll              vector <ll>
#define IOS              ios_base::sync_with_stdio(0); cin.tie(NULL);
#define endl             '\n'   
using namespace std;

ll gcd (ll a, ll b) {
return b ? gcd (b, a % b) : a;
}

int main()
{
    IOS
 	// freopen("input.txt","r",stdin);
 	// freopen("output.txt","w",stdout);
 	// freopen("error.txt","w",stderr);
	ll n;
	cin>>n;
	ll a[n];
	bool f[1000001]={0};
	bool vis[1000001]={0};
	ll gc=0;
	bool hmo=false;
	for(ll& x:a)
	{
		cin>>x;
		if(!f[x])
			f[x]=true;
		else if(x>1)
			hmo=true;
		gc=gcd(gc,x);
	}
	for(ll i=2;i<1000001;i++){
		if(vis[i])
			continue;
		ll cnt=f[j];
		for(ll j=2*i;j<1000001;j+=i){
			vis[j]=true;
			if(f[j])
				cnt++;
		}	
		if(cnt>=2 || hmo){
			if(gc==1)
			{
				cout<<"setwise coprime"<<endl;
				return 0;
			}
			else
			{
				cout<<"not coprime"<<endl;
				return 0;
			}
		}
	}
	cout<<"pairwise coprime"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:26: error: 'j' was not declared in this scope
   45 |                 ll cnt=f[j];
      |                          ^