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

#include<iostream>
#include<cstdio>
#include<cmath>
#define rg register
#define ll long long

using namespace std;
int n,num[100010];
bool f;

int main()
{
	cin>>n;
	for(rg int i=1;i<=n;i++)
	{
		scanf("%d",&num[i]);
		if(num[i]&1) f=1;
	}
	if(!f) cout<<"second"<<endl;
	else cou<<"first"<<endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   14 |         for(rg int i=1;i<=n;i++)
      |                    ^
a.cc:20:14: error: 'cou' was not declared in this scope; did you mean 'cos'?
   20 |         else cou<<"first"<<endl;
      |              ^~~
      |              cos
Language: C++

#include<cstdio>
#include<iostream>

using namespace std;


int main()
{
	int n;
	int num=0;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		int x;
		cin>>x;
		if(x%2)
		{
			cout<<"first"<<endl;
			return;
		}
	}
	cout<<"second"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   19 |                         return;
      |                         ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long ll;

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

int max(int a, int b){return a > b ? a: b;}
int min(int a, int b){return a < b ? a: b;}

int main(void){
	
	long long a, b sum = 0;
	
	scanf("%lld", &a);
	
	for(long long i = 0; i < a; i++){
		scanf("%lld", &b);
		sum += b % 2;
	}
	
	
	if(sum % 2 == 0){
		printf("second\n");
	}else{
		printf("first\n");
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: expected initializer before 'sum'
   15 |         long long a, b sum = 0;
      |                        ^~~
a.cc:20:32: error: 'b' was not declared in this scope
   20 |                 scanf("%lld", &b);
      |                                ^
a.cc:21:17: error: 'sum' was not declared in this scope
   21 |                 sum += b % 2;
      |                 ^~~
a.cc:25:12: error: 'sum' was not declared in this scope
   25 |         if(sum % 2 == 0){
      |            ^~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main()
{
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(begin(a), end(a), greater());
  if (a.size() == 1) {
    if (a[0] % 2 == 0) {
      cout << "second" << endl;
    } else {
      cout << "first" << endl;
    }
  } else {
    if ((a[0] - a[1]) % 2 == 0) {
      cout << "second" << endl;
    } else {
      cout << "first" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(begin(a), end(a), greater());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <cmath>

#include <stdio.h>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;


int inptValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    rep(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

template <typename T>
void output(T a, int precision) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}

int main(int argc, const char * argv[]) {
    
    // source code
    int N;
    cin >> N;
    int a[N];
    int sum=0;
    for(int i=0;i<N;i++){
        cin >> a[i];
        sum += a[i];
    }
    if(sum%2 == 0){
        cout << second<<endl;
    }else{
        cout << first <<endl;
    }
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:64:17: error: 'second' was not declared in this scope
   64 |         cout << second<<endl;
      |                 ^~~~~~
a.cc:66:17: error: 'first' was not declared in this scope
   66 |         cout << first <<endl;
      |                 ^~~~~
Language: C++

include <cstdio>

int main() {
    int N, a;
    bool first=false;
    scanf("%d",&N);
    for (int i=0; i<N; i++) {
        scanf("%d",&a);
        if (a % 2 == 1) first = !first;
    }
    printf("%s\n",first ? "first" : "second");
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <cstdio>
      | ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define INF (1<<30)
#define MOD 1000000007
#define l_ength size
using ll = long long;
using namespace std;

int main(){
	int n; cin >> n;
	for( n-- ){
		int temp; cin >> temp;
		if( temp == 1 ){
			cout << "first" << endl;
			return 0;
		}
	}
	cout << "second" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ';' before ')' token
   10 |         for( n-- ){
      |                 ^~
      |                 ;
a.cc:18:9: error: expected primary-expression before 'return'
   18 |         return 0;
      |         ^~~~~~
a.cc:17:34: error: expected ')' before 'return'
   17 |         cout << "second" << endl;
      |                                  ^
      |                                  )
   18 |         return 0;
      |         ~~~~~~                    
a.cc:10:12: note: to match this '('
   10 |         for( n-- ){
      |            ^
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
int n , maxn1 , maxn2 , p;
int main()
{
	scanf("%d",&n);
	for(int i = 1 ; i <= n ; i = i + 1)
	{
		scanf("%d",&x);
		if(x % 2)
		{
			p = 1;
		}
	}
	if(p)
		printf("first");
	else
		printf("second");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: 'x' was not declared in this scope
   10 |                 scanf("%d",&x);
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >>n;
int a[i],b=0;c=0;
for (int i=0;i<n;i++){
cin >>a[i];
if (a[i]%2==0)b++;
else c++;
}
if (c>=1)cout <<"first" <<endl;
else <<"second"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 | int a[i],b=0;c=0;
      |       ^
a.cc:6:14: error: 'c' was not declared in this scope
    6 | int a[i],b=0;c=0;
      |              ^
a.cc:8:7: error: 'a' was not declared in this scope
    8 | cin >>a[i];
      |       ^
a.cc:13:6: error: expected primary-expression before '<<' token
   13 | else <<"second"<<endl;
      |      ^~
Language: C++

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define loop(i, x, n) for (int i = (x); i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
template<typename T> void cmax(T &a, T b) { a = max(a, b); }
template<typename T> void cmin(T &a, T b) { a = min(a, b); }

signed main() {
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i, n) cin >> a[i];
  int ans = accumulate(all(a), 0LL);
  uniqu(all(a));
  if (a.size() == 1) {
    if (a[0] % 2 == 1)
      cout << "first" << endl;
    else
      cout << "second" << endl;
    return 0;
  }
  cout << (ans % 2 == 1 ? "first" : "second") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:3: error: 'uniqu' was not declared in this scope
   32 |   uniqu(all(a));
      |   ^~~~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	bool ans=false;
	for(int i=1;i<=n;i++)
	{
		long long a;
		cin >> a;
		if(a%2==1)
			ans=true;
	}
	cout << (ans==true ? : "first" : "second") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: operands to '?:' have different types 'bool' and 'const char*'
   17 |         cout << (ans==true ? : "first" : "second") << endl;
      |                  ~~~~~~~~~~^~~~~~~~~~~
a.cc:17:39: error: expected ')' before ':' token
   17 |         cout << (ans==true ? : "first" : "second") << endl;
      |                 ~                     ^~
      |                                       )
Language: C++

#include<cstdio>

int main(){
int n;
ll cnt=0,a;
scanf("%d",&n);
for(register int i=1;i<=n;++i)scanf("%d",&a),cnt+=a;
if(cnt%(ll)n==0)puts("first");
else puts("second")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'll' was not declared in this scope
    5 | ll cnt=0,a;
      | ^~
a.cc:7:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    7 | for(register int i=1;i<=n;++i)scanf("%d",&a),cnt+=a;
      |                  ^
a.cc:7:43: error: 'a' was not declared in this scope
    7 | for(register int i=1;i<=n;++i)scanf("%d",&a),cnt+=a;
      |                                           ^
a.cc:7:46: error: 'cnt' was not declared in this scope; did you mean 'int'?
    7 | for(register int i=1;i<=n;++i)scanf("%d",&a),cnt+=a;
      |                                              ^~~
      |                                              int
a.cc:8:4: error: 'cnt' was not declared in this scope; did you mean 'int'?
    8 | if(cnt%(ll)n==0)puts("first");
      |    ^~~
      |    int
a.cc:8:12: error: expected ')' before 'n'
    8 | if(cnt%(ll)n==0)puts("first");
      |   ~        ^
      |            )
a.cc:9:20: error: expected ';' before '}' token
    9 | else puts("second")
      |                    ^
      |                    ;
   10 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const pair<T, U> &_p) { _out << _p.first << ' ' << _p.second << '\n'; return _out; }
template<typename T, typename U> inline istream &operator>> (istream &_in, pair<T, U> &_p) { _in >> _p.first >> _p.second; return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const vector<T> &_v) { if (_v.empty()) { return _out; } _out << _v.front() << ' '; for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) { _out << *_it <<' '; } return _out; }
template<typename T> inline istream &operator>> (istream &_in, vector<T> &_v) { for (auto &_i : _v) { _in >> _i; } return _in; }
template<typename T> inline ostream &operator<< (ostream &_out, const set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_set<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T> inline ostream &operator<< (ostream &_out, const unordered_multiset<T> &_s) { if (_s.empty()) { return _out; } _out << *_s.begin(); for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) { _out << ' ' << *_it; } return _out; }
template<typename T, typename U> inline ostream &operator<< (ostream &_out, const map<T, U> &_m) { if (_m.empty()) { return _out; }for (auto _it:_m) { _out << _it.first << ": " << _it.second << '\n'; } return _out; }
#define pb push_back
#define pob pop_back
#define makp make_pair
#define X first
#define Y second
#define ll long long
#define all(x) x.begin(),x.end()
#define up(a,t) (upper_bound(all(a),t) - a.begin())
#define lb(a,t) (lower_bound(all(a),t) - a.begin())
vector<int> dx = {1, -1, 0, 0};
vector<int> dy = {0, 0, 1, -1};
struct cord{
    int x;
};
#define ld long double
#define int long long
signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    int sum = 0;
    set<int, greater<int> > s;
    for(int i = 0;i < n;i++){
        int x;
        cin >> x;
        sum += x;
    }
    if(x % 2){
        cout << "first";
    }
    else{
        cout << "second";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:8: error: 'x' was not declared in this scope
   41 |     if(x % 2){
      |        ^
Language: C++

int main() {
	int N;
	cin >> N;
	vector<int> a(N);
	for (int i = 0; i < N; i++) {
		cin >> a[i];
		a[i] %= 2;
	}
	int g = a[0];
	for (int i = 1; i < N; i++) {
		g = g ^ a[i];
	}

	if (g == 1) {
		cout << "first" << endl;
	}
	else {
		cout << "second" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> N;
      |         ^~~
a.cc:4:9: error: 'vector' was not declared in this scope
    4 |         vector<int> a(N);
      |         ^~~~~~
a.cc:4:16: error: expected primary-expression before 'int'
    4 |         vector<int> a(N);
      |                ^~~
a.cc:6:24: error: 'a' was not declared in this scope
    6 |                 cin >> a[i];
      |                        ^
a.cc:9:17: error: 'a' was not declared in this scope
    9 |         int g = a[0];
      |                 ^
a.cc:15:17: error: 'cout' was not declared in this scope
   15 |                 cout << "first" << endl;
      |                 ^~~~
a.cc:15:36: error: 'endl' was not declared in this scope
   15 |                 cout << "first" << endl;
      |                                    ^~~~
a.cc:18:17: error: 'cout' was not declared in this scope
   18 |                 cout << "second" << endl;
      |                 ^~~~
a.cc:18:37: error: 'endl' was not declared in this scope
   18 |                 cout << "second" << endl;
      |                                     ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

int main() {
    int n;
    unsigned long long i, *a, first, second, tmp;

    if(!scanf("%d", &n)){return 0;}
    a = (unsigned long long *)malloc(n * sizeof(unsigned long long));
    if(!scanf("%ull", &first){return 0;}
    second = first;
    if (n >= 2) {
        if(!scanf("%ull", &second)){return 0;}
        if (first < second) {
            tmp = first;
            first = second;
            second = tmp;
        }
    }
    if (n >= 3) {
        for (i = 2; i < n; i++) {
            if(!scanf("%ull", &tmp)) {return 0;}
            if (first < tmp) {second = first; first = tmp;}
            else if (second < tmp) {second = tmp;}
        }
    }

    if ((first-second)%2 != 0) {puts("first");}
    else {puts("second");}

    free(a);
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:30: error: expected ')' before '{' token
   10 |     if(!scanf("%ull", &first){return 0;}
      |       ~                      ^
      |                              )
main.c:34:1: error: expected expression before '}' token
   34 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<bitset>
using namespace std;
//#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define ARDEB(i,X) cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define ARDEB(i,X) {}
#define END {}
#endif
typedef long long int ll;
#define int long long
typedef pair<int,int> P;
struct edge{int to,cost;};
#define REP(i,n) for(int i=0;i<(n);i++)
const int INF=100000000000000000;

int A[200010],B[200010],num[200010];
int N,M,W,C,E,G,K;
int ans=1,ans2,Max=0,Min=INF,Max2=0;
string S,T;
vector<int> V;
set<int> U;
map<int,int> H;
bool F,Q[200010];

void J(int n){
	if(n%2==0){
		cout<<"second"<<endl;
	}
	else{
		cout<<"first"<<endl;
	}
}

signed main(){
	cin>>N;
	REP(i,N){
		cin>>A[i];
	}
	if(N==1){
		J(A[0]);
		return 0;
	}
	REP(i,N){
		ans+=A[i];
	}
	J(sum);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:11: error: 'sum' was not declared in this scope; did you mean 'num'?
   63 |         J(sum);
      |           ^~~
      |           num
Language: C++

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

int main(){
	int n;
	cin >> n;
	ll sum = 0;
	for (int i = 0; i < n; ++i)
	{
		int a;
		cin >> a;
		sum += a;
	}
	if (a % 2 == 1)
		cout << "first" << endl;
	else
		cout << "second" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'a' was not declared in this scope
   15 |         if (a % 2 == 1)
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
const int INF=999999;

int main(){
long long n,k[100005];
bool same=true;
cin>>n;
for(int i=0;i<n;++i){
  cin>>k[i];
if(i){
  if(k[i]!=k[i-1])same=false;
}
}
if(same){
  if(n!=1)cout<<"second"<<endl;
else cout<<"first"<<endl;
}
else{
if(n%2=1){cout<<"second"<<endl;}
else cout<<"first"<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: lvalue required as left operand of assignment
   21 | if(n%2=1){cout<<"second"<<endl;}
      |    ~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
const int INF=999999;

int main(){
int n;
cin>>n;
if(n%2=1){cout<<"second"<<endl;}
else cout<<"first"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: lvalue required as left operand of assignment
    9 | if(n%2=1){cout<<"second"<<endl;}
      |    ~^~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i, n) for(long long i = 0; i < (long long)(n); i++)
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
int main(){
    ll n, p;
    cin >> n >> p;
    ll a = p;
    ll ans = 1;
    for(ll i = 2; i * i <= p; i++){
        int b = 0;
        for(; p % i == 0; p /= i){
            n++;
        }
        if(n >= N){
            ans *= pow(i , b / n);
        }
    }
    if(P != 1){
        if(N == 1){
            ans *= p;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'N' was not declared in this scope
   17 |         if(n >= N){
      |                 ^
a.cc:21:8: error: 'P' was not declared in this scope
   21 |     if(P != 1){
      |        ^
a.cc:22:12: error: 'N' was not declared in this scope
   22 |         if(N == 1){
      |            ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i, n) for(long long i = 0; i < (long long)(n); i++)
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
int main(){
    ll n, p;
    cin >> n >> p;
    ll a = p;
    ll ans = 1;
    for(ll i = 2; i * i <= P; i++){
        int b = 0;
        for(; P % i == 0; P /= i){
            n++;
        }
        if(n >= N){
            ans *= pow(i , b / n);
        }
    }
    if(P != 1){
        if(N == 1){
            ans *= P;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'P' was not declared in this scope
   12 |     for(ll i = 2; i * i <= P; i++){
      |                            ^
a.cc:17:17: error: 'N' was not declared in this scope
   17 |         if(n >= N){
      |                 ^
a.cc:21:8: error: 'P' was not declared in this scope
   21 |     if(P != 1){
      |        ^
a.cc:22:12: error: 'N' was not declared in this scope
   22 |         if(N == 1){
      |            ^
Language: C++

#include <iostream>
#include <unordered_map>

using namespace std;
using ll=long long;

int main(){

  ll n,p;
  cin>>n>>p;
  
  unordered_map<ll,int> mp;
  for(ll i=2;i*i<=p;i++){
    while(p%i==0){
      mp[i]++;
      p/=i
    }
  }
  if(p!=1)mp[p]++;
  
  ll ans=1;
  for(auto&[k,v]){
    for(int i=0;i<v/n;i++)ans*=k;
  }
  
  cout<<ans<<endl;
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: expected ';' before '}' token
   16 |       p/=i
      |           ^
      |           ;
   17 |     }
      |     ~      
a.cc:22:17: error: expected initializer before ')' token
   22 |   for(auto&[k,v]){
      |                 ^
a.cc:22:17: error: expected ';' before ')' token
   22 |   for(auto&[k,v]){
      |                 ^
      |                 ;
a.cc:22:17: error: expected primary-expression before ')' token
a.cc:22:17: error: expected ';' before ')' token
   22 |   for(auto&[k,v]){
      |                 ^
      |                 ;
Language: C++

#include <iostream>
#include <unordered_map>

using namespace std;
using ll=long ling;

int main(){

  ll n,p;
  cin>>n>>p;
  
  unordered_map<ll,int> mp;
  for(ll i=2;i*i<=p;i++){
    while(p%i==0){
      mp[i]++;
      p/=i
    }
  }
  if(p!=1)mp[p]++;
  
  ll ans=1;
  for(auto&[k,v]){
    for(int i=0;i<v/n;i++)ans*=k;
  }
  
  cout<<ans<<endl;
}
      


Compiler output:
a.cc:5:14: error: expected ';' before 'ling'
    5 | using ll=long ling;
      |              ^~~~~
      |              ;
a.cc: In function 'int main()':
a.cc:9:3: error: 'll' was not declared in this scope
    9 |   ll n,p;
      |   ^~
a.cc:10:8: error: 'n' was not declared in this scope
   10 |   cin>>n>>p;
      |        ^
a.cc:10:11: error: 'p' was not declared in this scope
   10 |   cin>>n>>p;
      |           ^
a.cc:12:23: error: template argument 3 is invalid
   12 |   unordered_map<ll,int> mp;
      |                       ^
a.cc:12:23: error: template argument 4 is invalid
a.cc:12:23: error: template argument 5 is invalid
a.cc:13:9: error: expected ';' before 'i'
   13 |   for(ll i=2;i*i<=p;i++){
      |         ^~
      |         ;
a.cc:13:14: error: 'i' was not declared in this scope
   13 |   for(ll i=2;i*i<=p;i++){
      |              ^
a.cc:21:5: error: expected ';' before 'ans'
   21 |   ll ans=1;
      |     ^~~~
      |     ;
a.cc:22:17: error: expected initializer before ')' token
   22 |   for(auto&[k,v]){
      |                 ^
a.cc:22:17: error: expected ';' before ')' token
   22 |   for(auto&[k,v]){
      |                 ^
      |                 ;
a.cc:22:17: error: expected primary-expression before ')' token
a.cc:22:17: error: expected ';' before ')' token
   22 |   for(auto&[k,v]){
      |                 ^
      |                 ;
a.cc:23:27: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |     for(int i=0;i<v/n;i++)ans*=k;
      |                           ^~~
      |                           abs
a.cc:26:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include <iostream>
#include <inordered_map>

using namespace std;
using ll=long ling;

int main(){

  ll n,p;
  cin>>n>>p;
  
  unordered_map<ll,int> mp;
  for(ll i=2;i*i<=p;i++){
    while(p%i==0){
      mp[i]++;
      p/=i
    }
  }
  if(p!=1)mp[p]++;
  
  ll ans=1;
  for(auto&[k,v]){
    for(int i=0;i<v/n;i++)ans*=k;
  }
  
  cout<<ans<<endl;
}
      

Compiler output:
a.cc:2:10: fatal error: inordered_map: No such file or directory
    2 | #include <inordered_map>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

package rensyuu;

import java.util.*;

public class Cmondai {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		long N = keyboard.nextLong();
		long P = keyboard.nextLong();
		
		HashMap<Long, Integer> prime = new HashMap<Long, Integer>();
		for (int i=2;1L*i*i<=P;i++) {
			while (P % i == 0) {
				int count = prime.containsKey((long)i) ? prime.get((long)i) : 0;
				prime.put((long)i, count + 1);
				P /= i;
			}
		}
		if (P != 1) prime.put(P, 1);
		
		long ans = 1;
        for (Map.Entry<Long, Integer> entry : prime.entrySet()) {
            for (int i=0; i < entry.getValue() / N; i++) {
        		ans *= entry.getKey();
        	} 
        }
		
		System.out.println(ans);
		keyboard.close();
	}
	
}

Compiler output:
Main.java:5: error: class Cmondai is public, should be declared in a file named Cmondai.java
public class Cmondai {
       ^
1 error
Language: Java

package rensyuu;

import java.util.*;

public class Cmondai {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		long N = keyboard.nextLong();
		long P = keyboard.nextLong();
		
		HashMap<Long, Integer> prime = new HashMap<Long, Integer>();
		for (int i=2;i*i<=P;i++) {
			while (P % i == 0) {
				int count = prime.containsKey((long)i) ? prime.get((long)i) : 0;
				prime.put((long)i, count + 1);
				P /= i;
			}
		}
		if (P != 1) prime.put(P, 1);
		
		long ans = 1;
        for (Map.Entry<Long, Integer> entry : prime.entrySet()) {
            for (int i=0; i < entry.getValue() / N; i++) {
        		ans *= entry.getKey();
        	} 
        }
		
		System.out.println(ans);
		keyboard.close();
	}
	
}

Compiler output:
Main.java:5: error: class Cmondai is public, should be declared in a file named Cmondai.java
public class Cmondai {
       ^
1 error
Language: C++

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

vector<pair<long long, long long> > prime_factorize(long long n) {
    vector<pair<long long, long long> > res;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) { ++num; n /= p; }
        res.push_back(make_pair(p, num));
    }
    if (n != 1) res.push_back(make_pair(n, 1));
    return res;
}

int main() {
    //
    int n;
    long long p;

    cin >> n >> p;

    auto f = pf(p);

    long long cnt = 1;
    for (auto P : f) {
        for (int i = 0; i < P.second / n; i++) { cnt *= P.first; }
    }
    //
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: 'pf' was not declared in this scope; did you mean 'f'?
   23 |     auto f = pf(p);
      |              ^~
      |              f
Language: C++

#include <iostream>
#include <map>
#include <unordered_map>
using namespace std;

#define int long long

int maxGCD(int N, int P)
{
    int ans = 1;

    // map to store prime factors of P
    unordered_map<int, int> prime_factors;

    // prime factorization of P
    for (int i = 2; i * i <= P; i++)
    {

        while (P % i == 0)
        {

            prime_factors[i]++;

            P /= i;
        }
    }

    if (P != 1)
        prime_factors[P]++;

    // traverse all prime factors and
    // multiply its 1/N power to the result
    for (auto v : prime_factors)
        ans *= pow(v.first, v.second / N);

    return ans;
}

signed main()
{
    int N,P;
    cin>>N>>P;
    cout<<maxGCD(N,P);
}

Compiler output:
a.cc: In function 'long long int maxGCD(long long int, long long int)':
a.cc:34:16: error: 'pow' was not declared in this scope
   34 |         ans *= pow(v.first, v.second / N);
      |                ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
struct pp{
	int p; int x;
};
pp a[50];
long long N, P;
int index = 0;
long long ans = 1;

void Nhap(){
	cin>>N>>P;
}

void Prime(long long n){
	for(long long i = 2; i<= sqrt(n); i++){
		bool kt = false;
		while(n%i == 0){
			a[index].p = i;
			a[index].x++;
			n/= i; 
			kt = true;
		}	
		if(kt== true) index++;
	}
	if(n>1){
		a[index].p = n;
		a[index].x = 1;
		index++;
	}
}

void Xuly(){
	for(int i = 0; i< index; i++){
		ans*= pow(a[i].p, (a[i].x / N));
	}
}

void Xuat(){
	cout<<ans;
}

int main(){
	Nhap();
	Prime(P);
//	cout<<index<<endl;
//	for(int i = 0; i< index; i++) cout<<a[i].p<<" "<<a[i].x<<endl;
	Xuly();
	Xuat();
}


Compiler output:
a.cc:8:5: error: 'int index' redeclared as different kind of entity
    8 | int index = 0;
      |     ^~~~~
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'void Prime(long long int)':
a.cc:19:26: error: invalid types 'pp [50][<unresolved overloaded function type>]' for array subscript
   19 |                         a[index].p = i;
      |                          ^
a.cc:20:26: error: invalid types 'pp [50][<unresolved overloaded function type>]' for array subscript
   20 |                         a[index].x++;
      |                          ^
a.cc:24:36: error: no post-increment operator for type
   24 |                 if(kt== true) index++;
      |                                    ^~
a.cc:27:18: error: invalid types 'pp [50][<unresolved overloaded function type>]' for array subscript
   27 |                 a[index].p = n;
      |                  ^
a.cc:28:18: error: invalid types 'pp [50][<unresolved overloaded function type>]' for array subscript
   28 |                 a[index].x = 1;
      |                  ^
a.cc:29:22: error: no post-increment operator for type
   29 |                 index++;
      |                      ^~
a.cc: In function 'void Xuly()':
a.cc:34:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   34 |         for(int i = 0; i< index; i++){
      |                        ~^~~~~~~
Language: Java

import java.io.*;
import java.math.*;
import java.util.*;
public class ProductAndGCD { 
 
	public static void main(String[] args) { 
		Scanner input = new Scanner(System.in);
		long N = input.nextLong();
		long P = input.nextLong(); //Product
		long maxGCD = 1;
		for (long prime = 2; prime <= Math.sqrt(P); prime++) {
			long numCurPrime = 0;
			while (P%prime==0) {
				P/=prime;
				numCurPrime++;
				if (numCurPrime%N==0) {
					maxGCD*=prime;
					numCurPrime=0; //Effectively floor division using simulation counters
				}
			}
		}
		if (P>1&&N==1) maxGCD*=P; //If P remains > 1, it is guaranteed to be prime
		//Only way a prime number increases GCD in this case is if array only contains 1 number
		//(i.e N==1)
		System.out.println(maxGCD);
	}
}

Compiler output:
Main.java:4: error: class ProductAndGCD is public, should be declared in a file named ProductAndGCD.java
public class ProductAndGCD { 
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<ll, ll> P;
ll Mod = 1000000007;

int main() {
  ll N,P;
  cin >> N >> P;
  vector<P> S;
  ll i = 2;
  ll ans = 1;
  while (P == 1) {
    if (P % i == 0) {
      ll cnt = 0;
      while (P%i==0) {
        P /= i;
        cnt++;
      }
      S.push_back(make_pair(i,cnt));
    }
    i++;
  }
  for (int i = 0; i < S.size(); i++) {
    if (S[i].second >= N) {
      ans *= S[i].first;
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   10 |   vector<P> S;
      |           ^
a.cc:10:11: note:   expected a type, got 'P'
a.cc:10:11: error: template argument 2 is invalid
a.cc:20:9: error: request for member 'push_back' in 'S', which is of non-class type 'int'
   20 |       S.push_back(make_pair(i,cnt));
      |         ^~~~~~~~~
a.cc:24:25: error: request for member 'size' in 'S', which is of non-class type 'int'
   24 |   for (int i = 0; i < S.size(); i++) {
      |                         ^~~~
a.cc:25:10: error: invalid types 'int[int]' for array subscript
   25 |     if (S[i].second >= N) {
      |          ^
a.cc:26:15: error: invalid types 'int[int]' for array subscript
   26 |       ans *= S[i].first;
      |               ^
Language: C++

#include <vector>
#include <iostream>
#include <cmath>

using namespace std;

// vector<pair<long long, long long> > prime_fac(long long N){
//     vector<pair<long long, long long> > res;
//     for(int i=2; i*i<=N; ++i){
//         if(N%i != 0)continue;

//         long long ex = 0;
//         while(N%i ==0){
//             ex++;
//             N /= i;
//         }

//         res.push_back({i, ex});
//     }

//     if(N != 1){
//         res.push_back({N, 1});
//     }

//     return res;
// } 

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;
        }
        res.push_back({a, ex});
    }
    if (N != 1) res.push_back({N, 1});
    return res;
}

int main(){

    long long N, P;
    cin >> N >> P;

    const auto& res = prime_fac(P);
    long long ans = 1;

    for(int i=0; i<res.size(); ++i){
        if(res[i].second >= N){
            long long tmp1 = (res[i].first);
            long long tmp2 = (res[i].second)/N;
            ans *= pow(tmp1, tmp2); 
        }
    }

    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:23: error: 'prime_fac' was not declared in this scope
   48 |     const auto& res = prime_fac(P);
      |                       ^~~~~~~~~
Language: C++


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;
        }
        res.push_back({a, ex});
    }
    if (N != 1) res.push_back({N, 1});
    return res;
}

int main(){

    long long N, P;
    cin >> N >> P;

    const auto& res = prime_fac(P);
    long long ans = 1;

    for(int i=0; i<res.size(); ++i){
        if(res[i].second >= N){
            long long tmp1 = (res[i].first);
            long long tmp2 = (res[i].second)/N;
            ans *= pow(tmp1, tmp2); 
        }
    }

    cout << ans << endl;

}

Compiler output:
a.cc:2:1: error: 'vector' does not name a type
    2 | vector<pair<long long, long long> > prime_factorize(long long N) {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:20:5: error: 'cin' was not declared in this scope
   20 |     cin >> N >> P;
      |     ^~~
a.cc:22:23: error: 'prime_fac' was not declared in this scope
   22 |     const auto& res = prime_fac(P);
      |                       ^~~~~~~~~
a.cc:29:20: error: 'pow' was not declared in this scope
   29 |             ans *= pow(tmp1, tmp2);
      |                    ^~~
a.cc:33:5: error: 'cout' was not declared in this scope
   33 |     cout << ans << endl;
      |     ^~~~
a.cc:33:20: error: 'endl' was not declared in this scope
   33 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <vector>
#include <iostream>
#include <cmath>

using namespace std;

vector<pair<long long, long long> > prime_fac(long long N){
    vector<pair<long long, long long> > res;
    for(int i=2; i*i<=N; ++i){
        if(N%i != 0)continue;

        long long ex = 0;
        while(N%i ==0){
            ex++;
            N /= i;
        }

        res.push_back({i, ex});
    }

    if(N != 1){
        res.push_back({N, 1});
    }

    return res;
} 

int main(){

    long long N, P;
    cin >> N >> P;

    const auto& res = prime_fac(P);
    long long ans = 1;

    for(int i=0; i<res.size(); ++i{
        if(res[i].second >= N){
            long long tmp1 = (res[i].first);
            long long tmp2 = (res[i].second)/N;
            ans *= pow(tmp1, tmp2); 
        }
    }

    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:35: error: expected ')' before '{' token
   36 |     for(int i=0; i<res.size(); ++i{
      |        ~                          ^
      |                                   )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t N,P;
  cin>>N>>P;
  map<int64_t,int64_t>M;
  int64_t X=P;
  for(int i=2;i*i<=P&&i<=X;i++){
  if(X%i==0){
  int64_t a=0;
    while(X%i==0){X/=i; a++;}
     a/=N;
    M[i]=a;
  
  }
  }if(X!=1)
    M[X]=1;
  int64_t ans=1;
    for(auto p:M){
    auto k=p.first;
      auto v=p.second;
      ans*=powl(k,v);
    
    }cout<<ans<<endl;
  }
    return 0;


Compiler output:
a.cc:26:5: error: expected unqualified-id before 'return'
   26 |     return 0;
      |     ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t N,P;
  cin>>N>>P;
  if(N==1)
    cout<<P<<endl;
  else{
  int64_t a=0;
    int64_t I=0;
    for(int64_t i=0;a<P;i++){
    
    a=pow(i,N);
      I=i;
    }
    int64_t ans=1;
    for(int64_t i=1;i<=I;i++){
    if(P%pow(i,N)==0)
      ans=i;
    
    
    }cout<<ans<<endl;
  
    
  
  }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: invalid operands of types 'int64_t' {aka 'long int'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   18 |     if(P%pow(i,N)==0)
      |        ~^~~~~~~~~
      |        |    |
      |        |    __gnu_cxx::__promote<double>::__type {aka double}
      |        int64_t {aka long int}
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<queue>
#include<cmath>
#define REP(i,a) for (ll i = 0;i < (a);++i)
#define FOR(i,a,b) for (ll i = (a);i < (b); ++i)
#define FORR(i,a,b) for (ll i = (a);i >= (b); --i)
#define ALL(obj) (obj).begin(),(obj).end()
#define SORT(list) sort(ALL((list)));
#define MOD 1000000007
using namespace std;
using ll = long long;
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,p;
    ll answer = 1;
    cin >> n>> p;

    if (n == 1) {
        cout << k << endl;
        return 0;
    }
    
    vector<pair<ll,ll>> prime = prime_factorize(p);

    for(auto itr = prime.begin(); itr != prime.end(); ++itr) {
        cerr << itr->first  << " "  << itr->second << endl;
        if(itr->second >= n)
            answer *= ((itr->second/n)*itr->first);
    }

    cout << answer << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:17: error: 'k' was not declared in this scope
   44 |         cout << k << endl;
      |                 ^
Language: C++

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

int main() {
    long long n,p;cin>>n>>p;
    long long n2=n,p3,p2=p;

    long long ans=1,cc=0;
    if(n==1)ans=p;
    else{

    if(n<p){
    while(n2>2){
        p2=sqrt(p2);
        n2=sqrt(n2);
    }
    if(n%2==1){
        if(p2%2==0)p2++;
    for(long long i=p2;i>=3;i-=2){
        p3=p;
        if(p3%pow(i,n)==0){
            ans=i;
            break;
        }
    }        
    }
    else{
    for(long long i=p2;i>=2;--i){
        p3=p;
        if(p3%pow(i,n)==0){
            ans=i;
            break;
        }
    }
    }
    }
    }
    cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   21 |         if(p3%pow(i,n)==0){
      |            ~~^~~~~~~~~
      |            |     |
      |            |     __gnu_cxx::__promote<double>::__type {aka double}
      |            long long int
a.cc:30:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   30 |         if(p3%pow(i,n)==0){
      |            ~~^~~~~~~~~
      |            |     |
      |            |     __gnu_cxx::__promote<double>::__type {aka double}
      |            long long int
Language: C++

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

vector<pair<int64_t,int64_t>> soinsuu(int64_t n){
    vector<pair<int64_t,int64_t>> ret;
    for(int64_t i=2;i*i<=n;i++){
        if(n%i !=0) continue;
        int64_t ex=0;
        while(n%i ==0){
            ex++;
            n /= i; //n変更することで、それ以降の約数で割り切れることはない
        }
        ret.push_back(make_pair(i,ex));
    }
    //nが素数だった場合
    if(n!=1) ret.push_back(make_pair(n,1));
    return ret;
}


int main(){
    int64_t n,p;
    cin >> n >> p;
    int64_t ans=1;
    auto ps=soinsuu(p);
    for(auto i:ps){
        //cout << i.first<<" "<<i.second<<endl;
        ans *= pow(i.first,(i.second/n));
    }
    cout << ans << endl;
}#include <bits/stdc++.h>
using namespace std;

vector<pair<int64_t,int64_t>> soinsuu(int64_t n){
    vector<pair<int64_t,int64_t>> ret;
    for(int64_t i=2;i*i<=n;i++){
        if(n%i !=0) continue;
        int64_t ex=0;
        while(n%i ==0){
            ex++;
            n /= i; //n変更することで、それ以降の約数で割り切れることはない
        }
        ret.push_back(make_pair(i,ex));
    }
    //nが素数だった場合
    if(n!=1) ret.push_back(make_pair(n,1));
    return ret;
}


int main(){
    int64_t n,p;
    cin >> n >> p;
    int64_t ans=1;
    auto ps=soinsuu(p);
    for(auto i:ps){
        //cout << i.first<<" "<<i.second<<endl;
        ans *= pow(i.first,(i.second/n));
    }
    cout << ans << endl;
}

Compiler output:
a.cc:31:2: error: stray '#' in program
   31 | }#include <bits/stdc++.h>
      |  ^
a.cc:31:3: error: 'include' does not name a type
   31 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:34:31: error: redefinition of 'std::vector<std::pair<long int, long int> > soinsuu(int64_t)'
   34 | vector<pair<int64_t,int64_t>> soinsuu(int64_t n){
      |                               ^~~~~~~
a.cc:4:31: note: 'std::vector<std::pair<long int, long int> > soinsuu(int64_t)' previously defined here
    4 | vector<pair<int64_t,int64_t>> soinsuu(int64_t n){
      |                               ^~~~~~~
a.cc:51:5: error: redefinition of 'int main()'
   51 | int main(){
      |     ^~~~
a.cc:21:5: note: 'int main()' previously defined here
   21 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	long long N, P;
	cin >> N >> P;
	long long ans = 1;
	long long Q = P;
	for (long long i = 2; i <= sqrt(P)+1; i++) {
		long long num = 0;
		while (Q % i == 0) {
			Q /= i;
			num++;
		}
		if (num >= N) ans *= i;
		if (Q == 1) break;
	}
	cout << (Q>1 && N==1 ? P : ans) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: 'sqrt' was not declared in this scope
    8 |         for (long long i = 2; i <= sqrt(P)+1; i++) {
      |                                    ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
 
using namespace std;
 
int main(){
	long long n,p;
	cin >> n >> p;
	map<long long ,long long> mp;
	
	if(p==1){
		cout << "1" << endl;
		return 0;
	}
	
	if(n==1){
		cout << p << endl;
		return 0;
	}
 
	long long num=p;
	for(long long i=2;i*i<=num;i++){
        if(num%i!=0)continue;
		while(num%i==0){
			mp[i]++;
			num /=i;
		}
	}
  
	long long ans=1;
	for(auto p:mp){
		long long x = p.first;
		long long y = p.second;
		if(y==0)continue;
		if(y>=n)ans*=pow(x,(y/n));
	}
	cout << ans << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:42:18: error: expected '}' at end of input
   42 |         return 0;
      |                  ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<vector>
#include<map>
#include<cmath>
#define ll long long
#define INF 0x3f3f3f3f
#define maxn 1000010
using namespace std;
ll n,p;
ll prime[maxn],num=0;
bool vis[maxn];
int main()
{
	for(ll i=2;i<=maxn+5;++i)
	{
		if(!vis[i])
		{
			prime[++num]=i;
		}
		for(int j=1;j<=num&&prime[j]*i<maxn+5;++j)
		{
			vis[prime[j]*i]=1;
			if(i%prime[j]==0)break;
		}
	}
	scanf("%lld%lld",&n,&p);
	if(n==1)printf("%lld\n",p);
	else
	{
		ll ans=1;
		for(int i=1;i<=num&&prime[i]<=p/prime[i];++i)
		{
			ll now=0;
			while(p%prime[i]==0)
			{
				p/=prime[i];
				now++;
			}
			ans=ans*pow(prime[i],(now/n));
		}
		printf("%lld\n",asd);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:33: error: 'asd' was not declared in this scope
   45 |                 printf("%lld\n",asd);
      |                                 ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <cmath>
#include <ios>
#include <ctype.h>
#include <stack>
#include <istream>
#include <stdio.h>
#include <map>
#include <set>
#include <queue>
#include <unordered_map>
#include <functional>
#include <bitset>
#include <list>
#include <deque>
#include <time.h>
#include <random>
#include <iomanip>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define pint pair<int,int>
const int INF = 1000000007;
const long double EPS = 1e-15;
const long double PI = acos(-1);
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
using Graph_weighted = vector<vector<pair<int,int>>>;
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
ll ceil(const ll a, const ll b) { return (a + b - 1) / b; }
map< int64_t, ll > prime_factor(int64_t n) {
  map< int64_t, ll > ret;
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}
int main(){
  ll n,p;
  cin >> n >> p;
  ll ans = 1;
  bool ans = false;
  const auto &res = prime_factor(p);
  for(auto i : res)if(i.second >= n)ans *= i.first,ans = true;
  if(!ans)return 1;
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:8: error: conflicting declaration 'bool ans'
   52 |   bool ans = false;
      |        ^~~
a.cc:51:6: note: previous declaration as 'll ans'
   51 |   ll ans = 1;
      |      ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define erep(i,n) for(int i = 0;i<=n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
#define erep1(i,n) for(int i = 1;i<=n;i++)
typedef long long ll;
#define vint vector<int>
#define vvint vector<vector<int>>
#define vstring vector<string>
#define vdouble vector<double>
#define vll vector<ll>
#define vbool vector<bool>
#define INF 100000000000000009
#define int long long
using P = pair<int,int>;

vector<P> prime_factorize(int n){
  vector<P> res;
  for(int p = 2;p*p <= n;p++){
    if(n % p != 0) continue;
    int num = 0;
    while(n % p == 0){
      num++;
      n /= p;
    }
    res.push_back(make_pair(p,num));
  }
  if(n != 1) res.push_back(make_pair(n,1));
  return res;
}

signed main(){
  int n,p;
  cin >> n >> p;
  auto res = prime_factorize(n);
  int ans = 1;
  for(auto p:fac){
    for(int j = 0;j < p.second/n;j++){
      ans *= p.first;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: 'fac' was not declared in this scope
   38 |   for(auto p:fac){
      |              ^~~
Language: C++

#include <vector>
#include <string>
#include <iostream>
#include <queue>
#include <algorithm>
#include <map>
#include <array>

using namespace std;

vector<int> table;
vector<bool> a;

int PRIME = 1000000007;

vector<vector<int>> map_w;
vector<vector<int>> map_h;


int main(int argc, char* argv[]){
    long long N, P;
    cin >> N >> P;

    long long ret = 1;
    long long factor = 2;
    int counter = 0;

    while(P > 1){
        counter = 0;
        while(P % factor == 0){
            P /= factor;
            ++counter;
            if(counter == N){
                ret *= factor;
                counter = 0;
            }
        }
        ++factor;
        if(std::sqrt(P) < factor){
            break;
        }
    }

    cout << ret;

}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:39:17: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   39 |         if(std::sqrt(P) < factor){
      |                 ^~~~
      |                 sort