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

//洛谷P1919
#include<bits/stdc++.h>
#include<complex>
using namespace std;

const int N=3e6+10;
const long double PI=acos(-1);
typedef complex<long double> Complex;
struct FastFourierTransform  {
    Complex omega [N], omegaInverse [N] ;
    void init ( int n )  {
        for ( int i = 0 ; i < n ; ++ i )  {
            omega [i] = Complex ( cos ( 2 * PI / n * i), sin ( 2 * PI / n * i ) ) ;
            omegaInverse [i] = conj(omega [i]);
        }
    }
    void transform ( Complex *a, int n, const Complex* omega ) {
        for ( int i = 0, j = 0 ; i < n ; ++ i )  {
            if ( i > j )  swap ( a [i], a [j] ) ;
                for( int l = n >> 1 ; ( j ^= l ) < l ; l >>= 1 ) ;
	    }
        for ( int l = 2 ; l <= n ; l <<= 1 )  {
            int m = l >> 1;
            for ( Complex *p = a ; p != a + n ; p += l )
                for ( int i = 0 ; i < m ; ++ i )  {
                    Complex t = omega [n / l * i] * p [m + i] ;
                    p [m + i] = p [i] - t ;
                    p [i] += t ;
                }
        }
    }
    void dft ( Complex *a, int n )  {
        transform ( a, n, omega ) ;
    }
    void idft ( Complex *a, int n )  {//逆变换
        transform ( a, n, omegaInverse ) ;
        for ( int i = 0 ; i < n ; ++ i ) a [i] /= n ;
    }
} fft ;
Complex a[N];

typedef long long ll;
ll P=200003;
ll c[N];
int index[200003];
int Pow[200003];

int main(){
    ll tmp=1;
    for(int i=0;i<=P-2;++i){
        index[tmp]=i;
        Pow[i]=tmp;
        tmp=tmp*2%P;
    }
    int n;
    scanf("%d",&n);
    ll ans=0;
    for(int i=0;i<n;++i){
        scanf("%lld",c+i);
        if(c[i]==0)continue;
        a[index[c[i]]]+=Complex(1,0),ans-=c[i]*c[i]%P;
    }
    
    tmp=1;
    n=2*P;
    while(tmp<n)tmp<<=1;
    n=tmp;
    fft.init(n);
    fft.dft(a,n);
    for(int i=0;i<n;++i)a[i]*=a[i];
    fft.idft(a,n);
    
    for(int i=0;i<n;++i){
        ans+=(ll)(a[i].real()+0.5)*Pow[i%(P-1)];
    }
        
    ans/=2;
    printf("%lld",ans);
    return 0;
}
/*
3
2019 2020 200002
*/

Compiler output:
a.cc:45:17: error: 'int index [200003]' redeclared as different kind of entity
   45 | int index[200003];
      |                 ^
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:2:
/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 'int main()':
a.cc:51:14: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' for array subscript
   51 |         index[tmp]=i;
      |              ^
a.cc:61:16: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' for array subscript
   61 |         a[index[c[i]]]+=Complex(1,0),ans-=c[i]*c[i]%P;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

using C = complex<double>;
double pi = acos(-1.0);

void FFT(vector<C>& A, bool inv) {
 int N=A.size();
 for(int i=0,j=0; j<N; j++){
  if(i<j) swap(A[i],A[j]);
  for(int k=N>>1; k>(i^=k); k>>=1);
 }
 for(int i=1; i<N; i<<=1){
  C q = C(cos(pi/i),sin(pi/i)*(inv?1.0:-1.0));
  C qj = C(1.0,0.0);
  rep(j,i){
   for(int k=j; k<N; k+=i*2){
    C l=A[k], r=A[k+i]*qj;
    A[k]=l+r;
    A[k+i]=l-r;
   }
   qj*=q;
  }
 }
 if(inv) rep(i,N) A[i]/=N;
}

vector<C> CONV(const vector<C>& A,const vector<C>& B) {
 int Z=1; while(Z<A.size()+B.size()) Z<<=1;
 vector<C> Ax(Z),Bx(Z);
 rep(i,Z) Ax[i]=Bx[i]=0;
 rep(i,A.size()) Ax[i]=A[i];
 rep(i,B.size()) Bx[i]=B[i];
 FFT(Ax,false);
 FFT(Bx,false);
 rep(i,Z) Ax[i]*=Bx[i];
 FFT(Ax,true);
 return move(v);
}

const ULL M=200003;
int N;
ULL I[M];
vector<C> A;
vector<C> V;

int main() {
 scanf("%d", &N);
 for (int i=0,j=1; i<M-1; i++,j=j*2%M) I[j]=i;
 A.resize(M-1);

 ULL sq=0;
 rep(i, N) {
  int a; scanf("%d",&a);
  if(a) A[I[a]] += C(1.0,0.0);
  sq += (ULL)a*a%M;
 }
 V = CONV(A,A);

 ULL ans=0;
 for (int i=0,j=1; i<V.size(); i++,j=j*2%M)
  ans += (ULL)(V[i].real()+0.5)*j;
 ans = (ans-sq)/2;

 cout<<ans<<endl;

 return 0;
}


Compiler output:
a.cc: In function 'std::vector<std::complex<double> > CONV(const std::vector<std::complex<double> >&, const std::vector<std::complex<double> >&)':
a.cc:41:14: error: 'v' was not declared in this scope
   41 |  return move(v);
      |              ^
Language: Java

import java.util.*;
class Solution{
public static int P= 200003;
  public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
    int N=sc.nextInt();
    int[] arr= new int[N];
     for(int i=0;i<N;i++){
        arr[i]= sc.nextInt();
     }
    int product=0;
    for(int j=0;j<N-1;j++){
    product+=(arr[0].arr[j+1])%P;
    }
    System.out.println(product);
  
  }





}


Compiler output:
Main.java:14: error: int cannot be dereferenced
    product+=(arr[0].arr[j+1])%P;
                    ^
1 error
Language: Java

import java.util.*;
class Solution{
public static int P= 200003;
  public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
    int N=sc.nextInt();
    int[] arr= new int[N];
     for(int i=0;i<N;i++){
        arr[i]= sc.nextInt();
     }
    int product=0;
    for(int j=0;j<N;j++){
    product+=(arr[0].arr[i+1])%P;
    }
    System.out.println(product);
  
  }





}

Compiler output:
Main.java:14: error: int cannot be dereferenced
    product+=(arr[0].arr[i+1])%P;
                    ^
Main.java:14: error: cannot find symbol
    product+=(arr[0].arr[i+1])%P;
                         ^
  symbol:   variable i
  location: class Solution
2 errors
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long P=200003;
    int n=sc.nextInt();
    ArrayList<Long> a=new ArrayList<Long>();
    for(int i=0;i<n;i++){
      long check=sc.nextLong();
      if(check%P!=0)a.add(check%P);
    }
    Long[] al=new long[a.size()];
    a.toArray(Long[] al);
    long sum=0;
    for(int i=0;i<al.length;i++){
      for(int j=i+1;j<al.length;j++){
        sum+=(al[i]*al[j])%P;
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:13: error: '.class' expected
    a.toArray(Long[] al);
                     ^
Main.java:13: error: ';' expected
    a.toArray(Long[] al);
                       ^
2 errors
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long P=200003;
    int n=sc.nextInt();
    ArrayList<Long> a=new ArrayList<Long>();
    for(int i=0;i<n;i++){
      long check=sc.nextLong();
      if(check%P!=0)a.add(check%P);
    }
    long[] al=new long[a.size()];
    a.toArray(al);
    long sum=0;
    for(int i=0;i<al.length;i++){
      for(int j=i+1;j<al.length;j++){
        sum+=(al[i]*al[j])%P;
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:13: error: no suitable method found for toArray(long[])
    a.toArray(al);
     ^
    method Collection.<T#1>toArray(IntFunction<T#1[]>) is not applicable
      (cannot infer type-variable(s) T#1
        (argument mismatch; long[] cannot be converted to IntFunction<T#1[]>))
    method ArrayList.<T#2>toArray(T#2[]) is not applicable
      (inference variable T#2 has incompatible bounds
        equality constraints: long
        upper bounds: Object)
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>toArray(IntFunction<T#1[]>)
    T#2 extends Object declared in method <T#2>toArray(T#2[])
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long P=200003;
    int n=sc.nextInt();
    ArrayList<Long> a=new ArrayList<Long>();
    for(int i=0;i<n;i++){
      long check=sc.nextLong();
      if(check%P!=0)a.add(check%P);
    }
    a.toArray(long[] al);
    long sum=0;
    for(int i=0;i<al.length;i++){
      for(int j=i+1;j<al.length;j++){
        sum+=(al[i]*al[j])%P;
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:12: error: '.class' expected
    a.toArray(long[] al);
                     ^
Main.java:12: error: ';' expected
    a.toArray(long[] al);
                       ^
2 errors
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long P=200003;
    int n=sc.nextInt();
    ArrayList<Long> a=new ArrayList<Long>();
    for(int i=0;i<n;i++){
      long check=sc.nextLong();
      if(check%P!=0)a.add(check%P);
    }
    long[] al=a.toArray(long[] a);
    long sum=0;
    for(int i=0;i<al.length;i++){
      for(int j=i+1;j<al.length;j++){
        sum+=(al[i]*al[j])%P;
      }
    }
    System.out.println(sum);
  }
}

Compiler output:
Main.java:12: error: '.class' expected
    long[] al=a.toArray(long[] a);
                               ^
Main.java:12: error: ';' expected
    long[] al=a.toArray(long[] a);
                                ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
#define pb push_back
#define mk make_pair
#define lld  double
#define p 200003
int main(){
    ll n;
    cin>>n;
    ll count=0;
    vector<ll> arr(n);
     ll square=0;
    for(ll i=0;i<n;i++){
        cin>>arr[i];
        arr[i]=arr[i]%p;
        count+=arr[i];
        square+=(arr[i]*arr[i])%p;
    }
    ans=((count*count-square)/2)%p;
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |     ans=((count*count-square)/2)%p;
      |     ^~~
      |     abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
#define pb push_back
#define mk make_pair
#define lld  double
#define p 200003
int main(){
    ll n;
    cin>>n;
    ll count=0;
    vector<lld> arr(n);
    for(ll i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]%p==0)
         count++;
    }
    n=n-count;
    ll ans=n*(n-1)/2;
   
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator%'
   15 |         if(arr[i]%p==0)
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
#define pb push_back
#define mk make_pair
#define lld  double
#define mod 200003
int main(){
    ll n;
    cin>>n;
    ll count=0;
    vector<lld> arr(n);
    for(ll i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]%p==0)
         count++;
    }
    n=n-count;
    ll ans=n*(n-1)/2;
   
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'p' was not declared in this scope
   15 |         if(arr[i]%p==0)
      |                   ^
Language: C++

#include <bits/stdc++.h>

#define LL long long
#define ft first
#define cp complex<double> 
#define sd second
#define mp(x,y) make_pair(x,y)
//#define int LL
using namespace std;
const int N   = (2e5+233)*4;
const int mod = 200003;
const double Pi= acos(-1.0);
const int INF =numeric_limits<int >::max();
#define For(n) for (int i=1;i<=n;++i)
#define rep(i,n) for (int i=1;i<=n;++i)
#define repp(i,x,y) for (int i=x;i<=y;++i)
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}
int omg[N],id[N],A[N],cnt[N],n,rev[N];
cp a[N];
void FFT(cp*a,int n,int f)
{
	repp(i,0,n-1) if (i>rev[i]) swap(a[i],a[rev[i]]);
	for (int i=1;i<n;i<<=1)
	{
		cp wn=(cp){ cos(Pi/i),sin(Pi/i)} ,x,y;
		for (int j=0;j<n;j+=i<<1)
		{
			cp w=(cp){1,0};
			for (int k=0;k<i;++k,w*=wn)
			  {
			  	x=a[j+k],y=a[i+j+k]*w;
			  	a[j+k]=x+y;
			  	a[i+j+k]=x-y;
			  }	
		}
		
	}
	if (f==1) return ;
	reverse(a+1,a+n);
	repp(i,0,n-1) a[i].imag()=a[i].imag()/n;
}
LL c[N];
/*
2
2019 2020 

*/
signed main()
{
	
	for (int i=1,x=2;x!=1;omg[i]=x,++i,x=x*2%mod) ;
	omg[0]=1;id[1]=0;
	For(mod) id[omg[i]]= i;
	read(n);
	For(n) 
	{  
	    read(A[i]);
		if (A[i]==0) continue;
		++cnt[id[A[i]]];
	}
	
	int R=mod<<1,L=1,g=0;
	while (L<=R) L<<=1,++g;
	repp(i,0,L-1) rev[i]=rev[i>>1]>>1 | (i&1)<<g-1;
	repp(i,0,R) a[i]={cnt[i],0};
	FFT(a,L,1);
	repp(i,0,L-1) a[i]=a[i]*a[i];
	FFT(a,L,-1);
	//memset(c,0,sizeof(cnt));
	repp(i,0,R) c[i%(mod-1)]+=round(a[i].real());
	For(n) --c[ id [1ll*A[i]*A[i]%mod ] ];
	LL ans=0;
	repp(i,0,mod) ans+=omg[ i]*1ll*c[i]/2;
	printf("%lld",ans);
	return 0;
}



Compiler output:
a.cc: In function 'void FFT(std::complex<double>*, int, int)':
a.cc:48:32: error: lvalue required as left operand of assignment
   48 |         repp(i,0,n-1) a[i].imag()=a[i].imag()/n;
      |                       ~~~~~~~~~^~
a.cc: In function 'int main()':
a.cc:73:32: warning: narrowing conversion of 'cnt[i]' from 'int' to 'double' [-Wnarrowing]
   73 |         repp(i,0,R) a[i]={cnt[i],0};
      |                           ~~~~~^
Language: C++

#include <bits/stdc++.h>

#define LL long long
#define ft first
#define cp complex<double> 
#define sd second
#define mp(x,y) make_pair(x,y)
//#define int LL
using namespace std;
const int N   = (2e5+233)*4;
const int mod = 200003;
const double Pi= acos(-1.0);
const int INF =numeric_limits<int >::max();
#define For(n) for (int i=1;i<=n;++i)
#define rep(i,n) for (int i=1;i<=n;++i)
#define repp(i,x,y) for (int i=x;i<=y;++i)
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}
int omg[N],id[N],A[N],cnt[N],n,rev[N];
cp a[N];
void FFT(cp*a,int n,int f)
{
	repp(i,0,n-1) if (i>rev[i]) swap(a[i],a[rev[i]]);
	for (int i=1;i<n;i<<=1)
	{
		cp wn=(cp){ cos(Pi/i),sin(Pi/i)} ,x,y;
		for (int j=0;j<n;j+=i<<1)
		{
			cp w=(cp){1,0};
			for (int k=0;k<i;++k,w*=wn)
			  {
			  	x=a[j+k],y=a[i+j+k]*w;
			  	a[j+k]=x+y;
			  	a[i+j+k]=x-y;
			  }	
		}
		
	}
	if (f==1) return ;
	reverse(a+1,a+n);
	repp(i,0,n-1) a[i].imag()/=n,a[i].real()/=n;
}
LL c[N];
/*
2
2019 2020 

*/
signed main()
{
	
	for (int i=1,x=2;x!=1;omg[i]=x,++i,x=x*2%mod) ;
	omg[0]=1;id[1]=0;
	For(mod) id[omg[i]]= i;
	read(n);
	For(n) 
	{  
	    read(A[i]);
		if (A[i]==0) continue;
		++cnt[id[A[i]]];
	}
	
	int R=mod<<1,L=1,g=0;
	while (L<=R) L<<=1,++g;
	repp(i,0,L-1) rev[i]=rev[i>>1]>>1 | (i&1)<<g-1;
	repp(i,0,R) a[i]={cnt[i],0};
	FFT(a,L,1);
	repp(i,0,L-1) a[i]=a[i]*a[i];
	FFT(a,L,-1);
	//memset(c,0,sizeof(cnt));
	repp(i,0,R) c[i%(mod-1)]+=round(a[i].real());
	For(n) --c[ id [1ll*A[i]*A[i]%mod ] ];
	LL ans=0;
	repp(i,0,mod) ans+=omg[ i]*1ll*c[i]/2;
	printf("%lld",ans);
	return 0;
}



Compiler output:
a.cc: In function 'void FFT(std::complex<double>*, int, int)':
a.cc:48:32: error: lvalue required as left operand of assignment
   48 |         repp(i,0,n-1) a[i].imag()/=n,a[i].real()/=n;
      |                       ~~~~~~~~~^~
a.cc:48:47: error: lvalue required as left operand of assignment
   48 |         repp(i,0,n-1) a[i].imag()/=n,a[i].real()/=n;
      |                                      ~~~~~~~~~^~
a.cc: In function 'int main()':
a.cc:73:32: warning: narrowing conversion of 'cnt[i]' from 'int' to 'double' [-Wnarrowing]
   73 |         repp(i,0,R) a[i]={cnt[i],0};
      |                           ~~~~~^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

const P = 200003;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  int n;
  cin >> n;
  
  vector<int> a;
  a.resize(n);
  
  for (int i = 0; i < n; i++)
  {
	cin >> a[i];
	a[i] %= P;
  }
  
  int sum = 0;
  for (int i = 0; i < n; i++)
	for (int j = i; j < n; j++)
	  sum += (a[i] * a[j]) % P;
  
  cout << sum;
  
  return 0;
}

Compiler output:
a.cc:6:7: error: 'P' does not name a type
    6 | const P = 200003;
      |       ^
a.cc: In function 'int main()':
a.cc:23:17: error: 'P' was not declared in this scope
   23 |         a[i] %= P;
      |                 ^
a.cc:29:34: error: 'P' was not declared in this scope
   29 |           sum += (a[i] * a[j]) % P;
      |                                  ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

const P = 200003;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  int n;
  cin >> n;
  
  vector<int> a;
  a.resize(n);
  
  for (int i = 0; i < n; i++)
  {
	cin >> a[i];
	a[i] %= P;
  }
  
  int sum = 0;
  for (int i = 0; i < n; i++)
	for (int j = i; j < n; j++)
	  sum += a[i] * a[j];
  
  cout << sum;
  
  return 0;
}

Compiler output:
a.cc:6:7: error: 'P' does not name a type
    6 | const P = 200003;
      |       ^
a.cc: In function 'int main()':
a.cc:23:17: error: 'P' was not declared in this scope
   23 |         a[i] %= P;
      |                 ^
Language: C++

// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 08/09/20 20:58:21
// -----------------------------------

#include <bits/stdc++.h>

#include "../../../library/include/modular.hpp"
#include "../../../library/include/fft.hpp"
#include "../../../library/include/convolution.hpp"

using namespace std;
using ll = long long;
static constexpr int MOD = 200003;
using Mint = Modular<MOD>;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int r = 2;
  while (true) {
    Mint m = 1;
    bool ok = true;
    for (int i = 0; i < MOD-2; i++) {
      m *= r;
      if (m == 1) {
        ok = false;
        break;
      }
    }
    if (ok)
      break;
  }
  array<int, MOD> vtoi = {};
  {
    Mint m = 1;
    for (int i = 0; i < MOD-1; i++) {
      vtoi[m.val()] = i;
      m *= r;
    }
  }

  Convolution<Fft>::Polynomial cnt(MOD);
  ll ans = 0;
  int n; cin>>n;
  for (int i = 0; i < n; i++) {
    int a; cin>>a;
    if (a == 0) continue;
    cnt[vtoi[a]] += 1;
    ans -= (ll) a * a % MOD;
  }
  auto cnvcnt = Convolution<Fft>(MOD*2)(cnt, cnt);
  {
    Mint m = 1;
    for (auto v:cnvcnt) {oj s 
      ans += m.val() * lround(v.real());
      m *= r;
    }
  }
  assert(ans % 2 == 0);
  ans /= 2;
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc:9:10: fatal error: ../../../library/include/modular.hpp: No such file or directory
    9 | #include "../../../library/include/modular.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_back
#define ALL(v) (v).begin(), (v).end()
#define debug(x) cerr << #x << " is " << x << endl
#define int ll
#define double long double

using namespace std;

typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;
typedef complex<long double> C;

const int INF = 1e9 + 7, P = 200003, N = 1 << 19;
const double TT = acos(-1);

int e[P], cnt[P], b[P];

C a[N];

int pos[N];

void FFT(C* a, int k, int inv) {
	for(int i=1;i<(1<<k);i++) pos[i] = (pos[i >> 1] >> 1) | ((i & 1) << (k-1));
	for(int i=0;i<(1<<k);i++) if(i < pos[i]) swap(a[i], a[pos[i]]);
	for(int len=2;len<=(1<<k);len<<=1) {
		C w = C(cos(2*TT/len), inv*sin(2*TT/len));
		for(int i=0;i<(1<<k);i+=len) {
			C p = C(1, 0);
			for(int j=i;j<i+len/2;j++,p*=w) {
				C l = a[j], r = a[j+len/2];
				a[j] = l + p * r, a[j+len/2] = l - p * r;
			}
		}
	}
}

signed main()
{
	IO_OP;
	
	int n;
	cin >> n;
	int pw = 1, ans = 0;
	for(int i = 0; i < P - 1; i++) {
		e[pw] = i;
		pw = pw * 2 % P;
	}	
	for(int i = 0; i < n; i++) {
		int x;
		cin >> x;
		if(x == 0) continue;
		cnt[e[x]]++;
		ans -= x * x % P;
	}
	for(int i = 0; i < P; i++)
		a[i] = cnt[i];
	FFT(a, 19, 1);
	for(int i = 0; i < N; i++)
		a[i] = a[i] * a[i];
	FFT(a, 19, -1);
	for(int i = 0; i < N; i++)
		b[i % (P-1)] += int(a[i].real() + 0.5) / N;

	pw = 1;
	for(int i = 0; i < P-1; i++) {
		ans += pw * b[i];
		pw = pw * 2 % P;
	}
	ans /= 2;
	cout << ans << endl;

		
}





Compiler output:
a.cc:12:16: error: 'long long' specified with 'double'
   12 | #define double long double
      |                ^~~~
a.cc:19:22: note: in expansion of macro 'double'
   19 | typedef complex<long double> C;
      |                      ^~~~~~
Language: C++

// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 08/09/20 20:58:21
// -----------------------------------

#include <bits/stdc++.h>

#include "../../../library/include/convolution.hpp"

using namespace std;
using ll = long long;

class Solver {
 public:
  static constexpr int MOD = 200003;
  using Mint = Modular<MOD>;
 private:
  int r;
  Convolution cnv;
  array<int, MOD> vtoi;

 public:
  Solver() : r(2), cnv(MOD*2), vtoi({}) {
    r = 2;
    while (true) {
      Mint m = 1;
      bool ok = true;
      for (int i = 0; i < MOD-2; i++) {
        m *= r;
        if (m == 1) {
          ok = false;
          break;
        }
      }
      if (ok)
        break;
    }
    {
      Mint m = 1;
      for (int i = 0; i < MOD-1; i++) {
        vtoi[m.val()] = i;
        m *= r;
      }
    }
  }

  void solve() {
    Convolution::Polynomial cnt(MOD);
    ll ans = 0;
    int n; cin>>n;
    for (int i = 0; i < n; i++) {
      int a; cin>>a;
      if (a == 0) continue;
      cnt[vtoi[a]]++;
      ans -= (ll) a * a % MOD;
    }
    auto cnvcnt = cnv(cnt, cnt);

    {
      Mint m = 1;
      for (auto v:cnvcnt) {
        ans += m.val() * v.val();
        m *= r;
      }
    }
    ans /= 2;
    cout << ans << endl;
  }

};

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  Solver().solve();

  return 0;
}


Compiler output:
a.cc:9:10: fatal error: ../../../library/include/convolution.hpp: No such file or directory
    9 | #include "../../../library/include/convolution.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{int p=200003;
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;++i)
  { cin>>a[i];
   sum+=a[i]%p;
  }
 int x=0;
 int ans=0;
 for(int i=0;i<n;++i)
 {
   x+=a[i];
   ans+=(a[i]*(sum-x))%p;
 }
 cout<<(ans+p)%p;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: 'sum' was not declared in this scope
   10 |    sum+=a[i]%p;
      |    ^~~
a.cc:17:16: error: 'sum' was not declared in this scope
   17 |    ans+=(a[i]*(sum-x))%p;
      |                ^~~
Language: C++

// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 08/09/20 20:58:21
// -----------------------------------

#include <bits/stdc++.h>

#include "../../../library/include/convolution.hpp"

using namespace std;
using ll = long long;

constexpr int MOD = 200003;
using Mint = Modular<MOD>;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int n; cin>>n;

  int r = 2;
  while (true) {
    Mint m = 1;
    bool ok = true;
    for (int i = 0; i < MOD-2; i++) {
      m *= r;
      if (m == 1) {
        ok = false;
        break;
      }
    }
    if (ok)
      break;
    r++;
  }

  array<int, MOD> atoi = {};
  {
    Mint m = 1;
    for (int i = 0; i < MOD-1; i++) {
      atoi[m.val()] = i;
      m *= r;
    }
  }

  Convolution::Polynomial cnt(MOD-1);
  ll ans = 0;
  for (int i = 0; i < n; i++) {
    int a; cin>>a;
    if (a == 0) continue;
    ans -= (ll) a * a % MOD;
    cnt[atoi[a]]++;
  }

  auto conved = Convolution(MOD*2)(cnt, cnt);
  {
    Mint m = 1;
    for (auto v:conved) {
      ans += m.val() * v.val();
      m *= r;
    }
  }
  if (ans % 2 == 1)
    exit(1);
  ans /= 2;
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc:9:10: fatal error: ../../../library/include/convolution.hpp: No such file or directory
    9 | #include "../../../library/include/convolution.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 08/09/20 20:58:21
// -----------------------------------

#include <bits/stdc++.h>

#include "../../../library/include/convolution.hpp"

using namespace std;
using ll = long long;

constexpr int MOD = 200003;
using Mint = Modular<MOD>;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int n; cin>>n;

  int r = 2;
  while (true) {
    Mint m = 1;
    bool ok = true;
    for (int i = 0; i < MOD-2; i++) {
      m *= r;
      if (m == 1) {
        ok = false;
        break;
      }
    }
    if (ok)
      break;
    r++;
  }

  array<int, MOD> atoi = {};
  {
    Mint m = 1;
    for (int i = 0; i < MOD; i++) {
      atoi[m.val()] = i;
      m *= r;
    }
  }

  Convolution::Polynomial cnt(MOD);
  ll ans = 0;
  for (int i = 0; i < n; i++) {
    int a; cin>>a;
    if (a == 0) continue;
    ans -= (ll) a * a % MOD;
//    cerr<<"-"<<(ll)a*a%MOD<<endl;
    cnt[atoi[a]]++;
  }

  auto conved = Convolution(MOD*2-1)(cnt, cnt);
  {
    Modular<MOD> m = 1;
    int c = 0;
    for (auto v:conved) {
//      if (v.val() > 0)
//        cerr<<c<<" "<<m<<" "<<v.val()<<endl;
      ans += m.val() * v.val();
      m *= r;
      c++;
    }
  }
  ans /= 2;
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc:9:10: fatal error: ../../../library/include/convolution.hpp: No such file or directory
    9 | #include "../../../library/include/convolution.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;
using int64 = long long;

constexpr int DEBUG = 0;

constexpr int64 P = 200003;

using Complex = complex<double>;

// Reference: http://www.prefield.com/algorithm/math/fft.html
vector<Complex> DFT(const vector<Complex>& p, int n, int sign = 1) {
  const double theta = 2.0 * M_PI / n * sign;
  int unit = 1;
  vector<Complex> q = p;
  for (int m = n; m >= 2; m >>= 1) {
    int mh = m >> 1;
    for (int i = 0; i < mh; i++) {
      Complex w = Complex(cos(theta * unit * i), sin(theta * unit * i));
      for (int j = i; j < n; j += m) {
        int k = j + mh;
        Complex x = q[j] - q[k];
        q[j] += q[k];
        q[k] = w * x;
      }
    }
    unit *= 2;
  }
  int i = 0;
  for (int j = 1; j < n - 1; j++) {
    for (int k = n >> 1; k > (i ^= k); k >>= 1);
    if (j < i) swap(q[i], q[j]);
  }
  return q;
}
 
vector<Complex> InvDFT(const vector<Complex>& p, int n) {
  auto q = DFT(p, n, -1);
  for(int i = 0; i < n; i++) {
    q[i] /= n;
  }
  return q;
}
 
vector<Complex> MultiplyFFT(
    const vector<Complex>& p1, const vector<Complex>& p2) {
  int d = p1.size() + p2.size() - 1;
  int n = 1;
  while(n < d + 1) n *= 2;
 
  auto q1 = p1;
  q1.resize(n);
  auto q2 = p2;
  q2.resize(n);
  auto r1 = DFT(q1, n);
  auto r2 = DFT(q2, n);
 
  vector<Complex> s(n);
  for(int i = 0; i < n; i++) {
    s[i] = r1[i] * r2[i];
  }
  return InvDFT(s, n);
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  // i = 2^p
  vector<int64> i_to_p(P, -1);
  vector<int64> p_to_i(P - 1, -1);
  {
    int64 x = 1;
    for (int i = 0; i < P - 1; i++) {
      i_to_p[x] = i;
      p_to_i[i] = x;
      x *= 2;
      x %= P;
    }
  }

  int n;
  cin >> n;

  int64 delta = 0;
  vector<Complex> xs(P - 1);
  for (int i = 0; i < n; i++) {
    int64 a;
    cin >> a;
    if (a == 0) continue;
    xs[i_to_p[a]] += 1;
    // cout << a * a % P << endl;
    delta += a * a % P;
  }
  // cout << "Before FFT" << endl;
  vector<Complex> ys = MultiplyFFT(xs, xs);
  // cout << "After FFT" << endl;
  int64 ans = 0;
  for (int i = 0; i < ys.size(); i++) {
    int k = i % (P - 1);
    // int64 c = roundf64(ys[i].real());
    // int64 v = p_to_i[k];
    // if (c > 0) {
    //   cout << c << " " << v << endl;
    // }
    ans += p_to_i[k] * roundf64(ys[i].Re());
  }
  // cout << ans << endl;
  ans -= delta;
  ans /= 2;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:107:39: error: '__gnu_cxx::__alloc_traits<std::allocator<std::complex<double> >, std::complex<double> >::value_type' {aka 'class std::complex<double>'} has no member named 'Re'
  107 |     ans += p_to_i[k] * roundf64(ys[i].Re());
      |                                       ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long P = 200003;
const double PI = acos(-1);
long long modpow(long long a, long long b, long long M){
	long long ans = 1;
	while (b > 0){
		if (b % 2 == 1){
			ans *= a;
			ans %= M;
		}
		a *= a;
		a %= M;
		b /= 2;
	}
	return ans;
}
vector<complex<double>> fft(vector<complex<double>> A, bool inv){
	int N = A.size();
	int M = 0;
	for (int i = 1; i < N; i *= 2){
		M++;
	}
	for (int i = 0; i < N; i++){
		int j = 0;
		for (int k = 0; k < M; k++){
			if ((i >> k) & 1){
				j |= 1 << (M - 1 - k);
			}
		}
		if (i < j){
			swap(A[i], A[j]);
		}
	}
	for (int i = 1; i < N; i *= 2){
		for (int j = 0; j < i; j++){
			complex<double> z = polar((double) 1, (2 * PI) / (i * 2) * j * (inv ? -1 : 1));
			for (int k = 0; k < N; k += i * 2){
				complex<double> s = A[j + k];
				complex<double> t = A[j + k + i] * z;
				A[j + k] = s + t;
				A[j + k + i] = s - t;
			}
		}
	}
	if (inv){
		for (int i = 0; i < N; i++){
			A[i] /= N;
		}
	}
	return A;
}
vector<double> convolution(vector<double> A, vector<double> B){
	int deg = A.size() + B.size() - 1;
	int N = 1;
	while (N < deg){
		N *= 2;
	}
	vector<complex<double>> A2(N);
	for (int i = 0; i < A.size(); i++){
		A2[i] = A[i];
	}
	while (A2.size() < N){
		A2.push_back(0);
	}
	vector<complex<double>> B2(N);
	for (int i = 0; i < B.size(); i++){
		B2[i] = B[i];
	}
	while (B2.size() < N){
		B2.push_back(0);
	}
	vector<complex<double>> a = fft(A2, false);
	vector<complex<double>> b = fft(B2, false);
	vector<complex<double>> c(N);
	for (int i = 0; i < N; i++){
		c[i] = a[i] * b[i];
	}
	c = fft(c, true);
	vector<double> ans(deg);
	for (int i = 0; i < deg; i++){
		ans[i] = c[i].real();
	}
	return ans;
}
int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++){
    cin >> A[i];
  }
  vector<long long> B;
  for (int i = 0; i < N; i++){
    if (A[i] > 0){
      B.push_back(A[i]);
    }
  }
  N = B.size();
  vector<int> cnt(P, 0);
  for (int i = 0; i < N; i++){
    cnt[B[i]]++;
  }
  vector<long long> pow(P, 1);
  for (int i = 1; i < P; i++){
    pow[i] = pow[i - 1] * 2 % P;
  }
  vector<int> log(P);
  for (int i = 0; i < P - 1; i++){
    log[pow[i]] = i;
  }
  vector<long long> f(P - 1, 0);
  for (int i = 0; i < N; i++){
    f[log[B[i]]]++;
  }
  vector<long long> g = convolution(f, f);
  vector<long long> f2(P - 1, 0);
  for (int i = 0; i < g.size(); i++){
    f2[i % (P - 1)] += g[i];
  }
  long long ans = 0;
  for (int i = 0; i < P - 1; i++){
    ans += pow[i] * f2[i];
  }
  for (int i = 0; i < N; i++){
    ans -= B[i] * B[i] % P;
  }
  assert(ans % 2 == 0);
  ans /= 2;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:116:37: error: could not convert 'f' from 'vector<long long int>' to 'vector<double>'
  116 |   vector<long long> g = convolution(f, f);
      |                                     ^
      |                                     |
      |                                     vector<long long int>
Language: C++

#include <iostraem>
#include <vector>

using namespace std;

int main(){
  	long long N;
  	long long P=200003;
  	cin >> N;
  	vector<long long> A(N);
  	long long sum=0;
  	for(long long i=0;i<N;i++){
      	cin >> A[i];
      	for(long long j=0;j<i;j++){
          	sum+=(A[i]*A[j])%P;
        }
    }
  	cout << sum << endl;
}

Compiler output:
a.cc:1:10: fatal error: iostraem: No such file or directory
    1 | #include <iostraem>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <stack>
#include <algorithm>
#define MOD 200003
#define forn(a, n) for(int a = 0; a<(int) (n); ++a)
#define dforn(a, n) for(int a = (n)-1; a>=0; --a)
#define forall(a, all) for(__typeof(all.begin()) a = all.begin(); a != all.end(); ++a)
#define EPS 0.000000000001
using namespace std;
typedef long long tint;
typedef pair<tint, tint> pii;
typedef vector<tint> vi;
typedef vector<vi> vvi;

typedef tint tipo;

tipo* ini(int l){
	tipo *r = new tipo[l];
	fill(r, r+l, 0);
	return r;
}
#define add(l,s,d,k)forn(i, l)(d)[i]+=(s)[i]*k
void mulFast(int l, tipo *n1, tipo *n2, tipo *nr){
	if(l<=0)return;
	if(l<35){
		forn(i, l)forn(j, l)nr[i+j]+=n1[i]*n2[j];
	}else{
		int lac = l/2, lbd = l - (l/2);
		tipo *a = n1, *b=n1+lac, *c=n2, *d=n2+lac;
		tipo *ab = ini(lbd+1), *cd = ini(lbd+1);
		tipo *ac = ini(lac+lac), *bd = ini(lbd+lbd);
		add(lac, a, ab, 1);
		add(lbd, b, ab, 1);
		add(lac, c, cd, 1);
		add(lbd, d, cd, 1);
		mulFast(lac, a, c, ac);
		mulFast(lbd, b, d, bd);
		add(lac+lac, ac, nr+lac,-1);
		add(lbd+lbd, bd, nr+lac,-1);
		add(lac+lac, ac, nr,1);
		add(lbd+lbd, bd, nr+lac+lac,1);
		mulFast(lbd+1, ab, cd, nr+lac);
		free(ab); free(cd); free(ac); free(bd);
	}
}
void mulFast(int l1, tipo *n1, int l2, tipo *n2, int &lr, tipo *nr){
	while(l1<l2) n1[l1++]=0;
	while(l2<l1) n2[l2++]=0;
	lr=l1+l2+3;
	fill(nr, nr+lr, 0);
	mulFast(l1, n1, n2, nr);

	while(lr>1 && nr[lr-1]==0)lr--;
}

tint cant[MOD+5];
tint res[2*MOD+10];
int main()
{
	vi perm(MOD+5), inv(MOD+5);
	tint r  = 1;
	forn(i, MOD-1) {
		perm[i] = r;
		inv[r] = i;
		r *= 2;
		r %= MOD;
	}
	
	forn(i, MOD) cant[i] = 0;
	
	int n;
	cin >> n;
	forn(i, n) {
		tint r;
		cin >> r;
		if(r > 0) {
			cant[inv[r]]++;
		}
	}
	
	ini(MOD+5);
	forn(i, 2*MOD+10) res[i] = 0;
	mulFast(MOD+5, cant, cant, res);
	
	tint ans = 0;
	forn(i, 2*MOD+5) {
		if(res[i] != 0)
		tint g = i % (MOD-1);
		ans += perm[g] * res[i];
	}
	
	forn(i, MOD+5) {
		ans -= (perm[i] *perm[i]) % MOD * cant[i];
	}
	cout << ans/2 << endl;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:96:29: error: 'g' was not declared in this scope
   96 |                 ans += perm[g] * res[i];
      |                             ^
Language: Java

import java.util.*;
import java.io.*;
 
public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    int P = 200003;
    int n = scan.nextInt();
    int[] array = new int[n];
    for(int i = 0; i < n; i++){
      array[i] = Integer.ParseInt(scan.next()) % P;
    }
    
    int sum = 0;
    
    for(int i = 0; i < n; i++){
      for(int j = i; j < n; j++){
        int temp = array[i] * array[j];
        sum += temp % P;
      }
    }
    
    System.out.println(sum);
  }
}

Compiler output:
Main.java:11: error: cannot find symbol
      array[i] = Integer.ParseInt(scan.next()) % P;
                        ^
  symbol:   method ParseInt(String)
  location: class Integer
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
  public static void main(String[] args ) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int total = 0;
    int[] kazu = new int[N];
    for (int i=0; i<N; i++) {
    	int kazu[i]=sc.nextInt();
    }
    for (int i=0; i<N; i++){
      int j=i+1;
      if (kazu[i]>0) {
        while (j<N){
          int seki=kazu[i]*kazu[j];     
          total = total + seki%200003;
          j=j+1;
        }
      }
    }
    System.out.println(total);
  }
}

Compiler output:
Main.java:10: error: ']' expected
    	int kazu[i]=sc.nextInt();
    	         ^
Main.java:10: error: ';' expected
    	int kazu[i]=sc.nextInt();
    	          ^
2 errors
Language: C

//
//
//#include <bits/stdc++.h>
//
//using namespace std;
//bool check(string s1,string s2,int i,int j){
//    if(j==s2.size()-1 && i==s1.size()-1) return true;
//    else{
//    while(s1[i]==s2[j]){
//        i++;
//        j++;
//    }
//    check(s1,s2,i,j);
//    }
//    if(j==s2.size()-1 && i==s1.size()-1) return true;
//    return false;
//}
//int main()
//{
//    int n;
//    cin>>n;
//    vector<string> str;
//    for(int i=0;i<n;i++){
//    cin>>str[i];
//    }
//    int pairs=0;
//    sort(str.begin(),str.end());
//    for(int i=0;i<n-1;i++){
//        for(int j=i+1;j<n;j++){
//            if(check(str[i],str[j],0,0)){
//                pairs++;
//            }
//        }
//    }
//    cout<<pairs<<endl;
//
//    return 0;
//}
/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include<iostream>
#include<vector>

using namespace std;

int main()
{
    long long ans=0;
  int n;
  cin>>n;
  int p=200003;
  vector<long long> arr(n);
  for(int i=0;i<n;i++){
      cin>>arr[i];
  }
  for(int i=0;i<n-1;i++){
      if(arr[i]==0) continue;
      for(int j=i+1;j<n;j++){
          long long  prouduct=((arr[i]%p)*(arr[j]%p))%p;
          ans+=prouduct;
          
      }
  }
  cout<<ans<<endl;

    return 0;
}


Compiler output:
main.c:47:9: fatal error: iostream: No such file or directory
   47 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#define ll long long int
using namesapce std;
int main()
{
  ll n,i,j,sum=0,a;
  cin>>n;
  ll arr[n];
  for(i=0;i<n;i++)
    cin>>arr[i];
  for(j=0;j<n;j++)
  {
    for(i=j+1;i<n;i++)
    {
      a=arr[i]*arr[j]%200003;
      sum=sum+a;
    }
  }
  cout<<ans;
  return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:19:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |   cout<<ans;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |   cout<<ans;
      |         ^~~
      |         abs
Language: Java

import java.util.*;

class Main() {
  public static void main(String args[]) {
    Scanner scan = new Scanner(System.in);
    ArrayList<Integer> list = new ArrayList<Integer>();
    int P = 200003;
    
    String sN = scan.nextLine();
    int N = Integer.valueOf(sN);
    
    for (int i = 0;i < N;i ++) {
      int val = scan.nextInt();
      list.add(val);
    }
    
    int sum = 0;
    for (int i = 0;i < N-1;i ++) {
      for (int j = i+1;j < N;j ++) {
        int Ai = list.get(i);
        int Aj = list.get(j);
        int mul = Ai * Aj;
        int sur = mul % P;
        sum += sur;
      }
    }
    
    System.out.println(sum);
  }
}
        
      
    


Compiler output:
Main.java:3: error: '{' expected
class Main() {
          ^
1 error
Language: C++

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

int main() {
  int N;
  cin>>N;
  vector <int> A (N);
  for (int i=0; i<N; i++) {
    cin >> A.at(i);
  }
  int sum=0;
  for (int i=0;i<N-1;i++) {
    for (int j=0;j<N;j++) {
      s=(A.at(i)*A.at(j))%200003;
      sum+=s;
    }
  }
  cout << sum <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 's' was not declared in this scope
   14 |       s=(A.at(i)*A.at(j))%200003;
      |       ^
Language: Java

import java.util.*;

class Main() {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    ArrayList<Integer> list = new ArrayList<Integer>();
    int P = 200003;
    
    String sN = scan.nextLine();
    int N = Integer.valueOf(sN);
    
    for (int i = 0;i < N;i ++) {
      int val = scan.nextInt();
      list.add(val);
    }
    
    int sum = 0;
    for (int i = 0;i < N-1;i ++) {
      for (int j = i+1;j < N;j ++) {
        int Ai = list.get(i);
        int Aj = list.get(j);
        int mul = Ai * Aj;
        int sur = mul % P;
        sum += sur;
      }
    }
    
    System.out.println(sum);
  }
}
        
      
    

Compiler output:
Main.java:3: error: '{' expected
class Main() {
          ^
1 error
Language: C++

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


int main(){
	int N=0;
	(void)scanf("%d",&N);


	char s[N]={};
	for(int i=0;i<N;i++){
		(void)scanf("%c ",&s[i]);
	}

	// printf("N=%d\n",N );
	// // printf("%d %s\n",a+b+c,s);
	
	for(int i=0;i<N;i++){
		printf("A[%d]%lf\n",i,A[i]);
	}

	int count=0;
	for(int i=0;i<N;i++){
		for(int j=0;j<N;j++){
			if(i<j){
				double a=A[i]*A[j];
				if(ceil(a)==floor(a)){
					count++;
					printf("%d %d %lf %lf\n",i,j,A[i],A[j] );		
				}
			

			}
				
		}
	}
	printf("%d\n",count );

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:39: error: 'A' was not declared in this scope
   22 |                 printf("A[%d]%lf\n",i,A[i]);
      |                                       ^
a.cc:29:42: error: 'A' was not declared in this scope
   29 |                                 double a=A[i]*A[j];
      |                                          ^
Language: C++

n = int(input())
a = list(map(int,input().split()))
b = [i%200003 for i in a]
s = 0
for i in range(n):
	for j in range(i):
		s+=(b[i]*b[j])%200003
print(s)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

const int P = 1000000007;

int point(int h, int i, int j)
{
  int prod = 1;
  do
  {
	prod *= i * j;
	i >>= 1;
	j >>= 1;
  }
  while (i != j);
  return prod * i;
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  int h, n;
  cin >> h;
  n = 2 << (h - 1);
  
  vector<int> a;
  a.resize(n);
  
  for (int i = 0; i < n; i++)
	cin >> a[i];
  
  long long int sum = 0;
  for (int i = 0; i < n; i++)
	for (int j = i; j < n; j++)
	{
	  if (a[i] >= a[j])
		continue;
	
	  sum += point(h, i, j) * point(h, a[i], a[j]);
	  if (sum >= (2 << 48UUL))
		sum %= P;
	}
  
  cout << sum % P;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:28: error: unable to find numeric literal operator 'operator""UUL'
   45 |           if (sum >= (2 << 48UUL))
      |                            ^~~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

const int P = 1000000007;

int point(int h, int i, int j)
{
  int prod = 1;
  do
  {
	prod *= i * j;
	i >>= 1;
	j >>= 1;
  }
  while (i != j)
  return prod * i;
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  int h, n;
  cin >> h;
  n = 2 << (h - 1);
  
  vector<int> a;
  a.resize(n);
  
  for (int i = 0; i < n; i++)
	cin >> a[i];
  
  long long int sum = 0;
  for (int i = 0; i < n; i++)
	for (int j = i; j < n; j++)
	{
	  if (a[i] >= a[j])
		continue;
	
	  sum += point(h, i, j) * point(h, a[i], a[j]);
	  if (sum >= 2 << 48)
		sum %= P;
	}
  
  cout << sum % P;
  
  return 0;
}

Compiler output:
a.cc: In function 'int point(int, int, int)':
a.cc:17:17: error: expected ';' before 'return'
   17 |   while (i != j)
      |                 ^
      |                 ;
   18 |   return prod * i;
      |   ~~~~~~         
a.cc: In function 'int main()':
a.cc:45:24: warning: left shift count >= width of type [-Wshift-count-overflow]
   45 |           if (sum >= 2 << 48)
      |                      ~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
int INF = 5e18+7;
int mod = 998244353;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int cnt[200005];
void score(char c,int i,int j,int k) {
    if(c == '+') {
        cnt[k] = cnt[i]+cnt[j];
    }
    else {
        cnt[k] = (int)(cnt[j] > cnt[i]);
    }
}
signed main() {
    cout << 452 << endl;
    cout << "+ 0 1 100000" << endl;
    score('+',0,1,100000);
    cout << "< 114514 100000 3" << endl;
    score('<',114514,100000,3);
    cout << "+ 3 5 5" << endl;
    score('+',3,5,5);
    for(int i = 1; i < 10; i++) {
        cout << "+" << i+4 << " " << 3 << " " << i+5 << endl;
        score('+',i+4,3,i+5);
        ans++;
    }
    for(int i = 0; i < 10; i++) {
        cout << "<" << " " << 100 << " " << 1 << " " << 101 << endl;
        score('<',100,1,101);
        ans++;
        for(int j = 0; j < 10; j++) {
            cout << "< " << j+4 << " " << 0 << " " << j+20 <<  endl;
            score('<',j+4,0,j+20);
            ans+=4;
        }
        for(int j = 0; j < 10; j++) {
            cout << "+ " << 101 << " " << j+20 << " " << j+1000 << endl;
            score('+',101,j+20,j+1000);
        }
        for(int j = 0; j < 10; j++) {
            cout << "< " << 3 << " " << j+1000 << " " << j+2000 << endl;
            score('<',3,j+1000,j+2000);
        }
        for(int j = 0; j < 10; j++) {
            cout << "+ " << j+2000 << " " << 3000 << " " << 3000 << endl;;
            score('+',j+2000,3000,3000);
        }
        cout << "+ " << 2 << " " << 3000 << " " << 2 << endl;
        score('+',2,3000,2);
        cout << "< " << 4000 << " " << 4000 << " " << 3000 << endl;
        score('<',4000,4000,3000);
        cout << "+ " << 100 << " " << 3 << " " << 100 << endl;
        score('+',100,3,100);
        ans += 3;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |         ans++;
      |         ^~~
      |         abs
a.cc:34:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |         ans++;
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int zero=199999,one=199998;
void add(int a,int b,int c){
    cout<<"+ "<<a<<" "<<b<<" "<<c<<endl;
}
void lt(int a,int b,int c){
    cout<<"< "<<a<<" "<<b<<" "<<c<<endl;
}
void pow(int a,int b){
    for(int i=1;i<=b;i++){
        add(a,a,a);
    }
}
void mul(int a,int b,int c){
    int tmp=10000;
    lt(a,zero,b);
    lt(tmp,zero,c);
    add(a,a,tmp);
    lt(a,one,a);
}

void fenjie(int base,int aim){
    int tmp=base+31;
    for(int i=30;i>=0;i--){
        int tmp2=base+32,tmp3=base+33;
        add(tmp2,zero,one);
        pow(tmp2,i);
        add(tmp2,tmp2,tmp);
        add(tmp3,one,aim);
        lt(tmp2,tmp2,tmp3);
        add(base+i,zero,tmp2);
        pow(tmp2,i);
        add(tmp,tmp,tmp2);
    }
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0);
    
    // init
    lt(one,zero,0);

    fenjie(100,0);
    fenjie(200,1);

    for(int i=0;i<=30;i++){
        for(int j=0;j<=30;j++){
            int tmp=100000,now=i+j+400;
            mul(tmp,i+100,j+200);
            add(now,now,tmp);
        }
    }
    for(int i=0;i<=60;i++){
        pow(i+400,i);
        add(2,2,i+400)
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:23: error: expected ';' before '}' token
   57 |         add(2,2,i+400)
      |                       ^
      |                       ;
   58 |     }
      |     ~