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

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


int main(){
	int a;
	string s;
	cin >> a >> s;
	if(a%2){
		cout << "No" << endl;
		return;
	}
	for(int i=0;i<a/2;i++){
		if(s[i]!=s[i+a/2]){
			cout << "No" << endl;
			return 0;
		}
	}
	
	cout << "Yes" << endl;
	return 0;
}

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

#define rep(i,N) for(int i=0;i<(int)N;i++)
#include <bits/stdc++.h>
using namespace std;
int main()
{
  int N;
  string S,T;
  cin>>N>>S;
  rep(i,N/2){T.push_back(S.at(i));}
  T++;
  if(S==T){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   10 |   T++;
      |   ~^~
Language: C++

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

int main()
{
	int N;
	string S;
	bool b = false;

	cin >> N >> S;

	if (N % 2 == 0)
	{
		int half = N / 2;

		if (!strcmp(S.substr(0, half).c_str(), S.substr(half,N).c_str()))
			b = true;
	}

	if (b)
		cout << "Yes";
	else
		cout << "No";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: 'strcmp' was not declared in this scope
   17 |                 if (!strcmp(S.substr(0, half).c_str(), S.substr(half,N).c_str()))
      |                      ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: Java

import java.util.*;

public class Test2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		if(s.length()%2==1)
			System.out.println("No");
		else {
			if(s.substring(s.length()/2).equals(s.substring(0, s.length()/2)))
					System.out.println("Yes");
			else
				System.out.println("No");
		}
	}

}


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

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

const int N = 110;
char s[N];

int main(){
    int n;
    bool flag = false;
    char str[2];
    scanf("%d", &n);
    gets(str);
    scanf("%s", s);
    if(n % 2 != 0)
        printf("No");
    else{
        int len = n / 2;
        for(int i = 0, j = len; i < len && j < n; i ++, j ++){
            if(s[i] != s[j]){
                flag = true;
                break;
            }
        }
        if(flag)
            printf("No");
        else
            printf("Yes");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   15 |     gets(str);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
  int N;
  cin >> N;
  string S, T;
  
  bool flag = false;
  for(in i = N/2; i < N; i++){
    T[i] = S[i];
  }
  
  for(int i = 0; i < N/2; i++){
    if(S[i] != T[i]){
      flag = true;
  	  break;
  	}
  }
  
  if(flag) cout<< "No" << endl;
  else cout << "Yes" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'in' was not declared in this scope; did you mean 'yn'?
   10 |   for(in i = N/2; i < N; i++){
      |       ^~
      |       yn
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for(in i = N/2; i < N; i++){
      |                   ^
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
    char s[105],s1[105],s2[105];
    int n,i,j;
    scanf("%d", &n);
    scanf("%s", s);
    for(i=0;i<n/2;i++)
    {
        s1[i]=s[i];
    }
    i=0;
    for(j=n/2;j<n;j++)
    {
        s2[i++]=s[j];
    }
    if(strcmp(s1,s2)==0)
    {
        printf("Yes\n");
    }
    else
    {
        printf("No\n");
    }
 getch();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: 'getch' was not declared in this scope; did you mean 'getc'?
   26 |  getch();
      |  ^~~~~
      |  getc
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(void){
 int n;
 string S;
 string L,R;
 cin >> n;
  cin >> S;
  if(n%2==1)
    cout << "No";
    else{
        for(int i=0;i<n/2;i++)
          L=L+S[i];
        for(int i=n/2;i<n;i++)
            R=R+S[i];
            if(L==R)
              cout "Yes";
             else cout << "No";
    }
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: expected ';' before string constant
   18 |               cout "Yes";
      |                   ^~~~~~
      |                   ;
Language: C++

using namespace std; 
 
int main() { 
  int n; cin >> n; 
  string s; cin >> s; 
  string a = s.substr(0, n/2); 
  string b = s.substr(n/2, n/2);
  if (a == b) { cout << "Yes" << endl; } 
  else  { cout << "No" << endl; } 
 
  return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' was not declared in this scope
    4 |   int n; cin >> n;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s; cin >> s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:20: error: 's' was not declared in this scope
    5 |   string s; cin >> s;
      |                    ^
a.cc:6:9: error: expected ';' before 'a'
    6 |   string a = s.substr(0, n/2);
      |         ^~
      |         ;
a.cc:7:9: error: expected ';' before 'b'
    7 |   string b = s.substr(n/2, n/2);
      |         ^~
      |         ;
a.cc:8:7: error: 'a' was not declared in this scope
    8 |   if (a == b) { cout << "Yes" << endl; }
      |       ^
a.cc:8:12: error: 'b' was not declared in this scope
    8 |   if (a == b) { cout << "Yes" << endl; }
      |            ^
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |   if (a == b) { cout << "Yes" << endl; }
      |                 ^~~~
a.cc:8:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:34: error: 'endl' was not declared in this scope
    8 |   if (a == b) { cout << "Yes" << endl; }
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:9:11: error: 'cout' was not declared in this scope
    9 |   else  { cout << "No" << endl; }
      |           ^~~~
a.cc:9:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:27: error: 'endl' was not declared in this scope
    9 |   else  { cout << "No" << endl; }
      |                           ^~~~
a.cc:9:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include <stdio.h>
#include <string.h>
int main()
{
    char s[105],s1[105],s2[105];
    int n,i,j;
    scanf("%d", &n);
    scanf("%s", s);
    for(i=0;i<n/2;i++)
    {
        s1[i]=s[i];
    }
    i=0;
    for(j=n/2;j<n;j++)
    {
        s2[i++]=s[j];
    }
    if(strcmp(s1,s2)==0)
    {
        printf("Yes\n");
    }
    else
    {
        printf("No\n");
    }
 getch();
}


Compiler output:
main.c: In function 'main':
main.c:26:2: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   26 |  getch();
      |  ^~~~~
      |  getc
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

const int N = 110;
char s[N];

int main(){
    int n;
    bool flag = false;
    char str[2];
    scanf("%d", &n);
    gets(str);
    scanf("%s", s);
    if(n % 2 != 0)
        printf("No");
    else{
        int len = n / 2;
        for(int i = 0, j = len; i < len && j < n; i ++, j ++){
            if(s[i] != s[j]){
                flag = true;
                break;
            }
        }
        if(flag)
            printf("No");
        else
            printf("Yes");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |     gets(str);
      |     ^~~~
      |     getw
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0;i < (n);++i)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;

int main() {
    int N;
    string S;
    cin >> N;
    cin >> S;
    int cnt = 0;

    if(N%2!=0){
        cout << "No" <<endl;
    }else{
        rep(i,N){
            if(S.(i)==S.(i+(N/2)))cnt++;
        }
if(cnt==N/2){
    cout<<"Yes"<<endl;
}else{
    cout<<"No"<<endl;
}
    }
    return 0;    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected unqualified-id before '(' token
   18 |             if(S.(i)==S.(i+(N/2)))cnt++;
      |                  ^
a.cc:18:25: error: expected unqualified-id before '(' token
   18 |             if(S.(i)==S.(i+(N/2)))cnt++;
      |                         ^
Language: C++

#include<iostream>
using namespace std;


int main(){
    int n;
    cin >> n;
    string s;
    cin >> s;

    if(n == 1){
        cout << "No" << endl;
        return 0;
    }
    
    for(int i = 0; i < n / 2; i++){
        if(s[i] != n/2 + i]){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected ')' before ']' token
   17 |         if(s[i] != n/2 + i]){
      |           ~               ^
      |                           )
a.cc:17:27: error: expected primary-expression before ']' token
Language: C++

#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);++i) #define ll long long const long long INF = 1LL<<60; const long long mod = 1e9 + 7; int main(){ int n; cin >> n; string s; cin >> s; bool b = false; if(n % 2 == 0){ REP(i,n/2){ if(s[i]==s[i+n/2]) b = true; else{ b = false; break; } } } if(b) cout << "Yes" << endl; else cout << "No" << endl; }

Compiler output:
a.cc:1:26: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);++i) #define ll long long const long long INF = 1LL<<60; const long long mod = 1e9 + 7; int main(){ int n; cin >> n; string s; cin >> s; bool b = false; if(n % 2 == 0){ REP(i,n/2){ if(s[i]==s[i+n/2]) b = true; else{ b = false; break; } } } if(b) cout << "Yes" << endl; else cout << "No" << endl; }
      |                          ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
    char s[101]={};
    int N=0;
    int flag=0;
    int ha=0;
    scanf("%d",&N);
    scanf("%s",s)
    ha=N/2;
    if(ha*2!=N){
        flag=1;
    }
    for(int i=0;i<ha;i++){
        if(s[i]!=s[i+ha]){
            flag=1;
        }
    }
    if(flag==0){
printf("Yes\n");
    }else{
printf("No\n");
    }
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: expected ';' before 'ha'
    9 |     scanf("%s",s)
      |                  ^
      |                  ;
   10 |     ha=N/2;
      |     ~~
Language: C++

n = int(input().strip())
s = input().strip()
if n%2!=0:
    print("NO")
elif s[:n//2]==s[n//2:]:
    print("Yes")
else:
    print("No")

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

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
    char s[105],s1[105],s2[105];
    int n,i,j;
    scanf("%d", &n);
    scanf("%s", s);
    for(i=0;i<n/2;i++)
    {
        s1[i]=s[i];
    }
    i=0;
    for(j=n/2;j<n;j++)
    {
        s2[i++]=s[j];
    }
    if(strcmp(s1,s2)==0)
    {
        printf("Yes\n");
    }
    else
    {
        printf("No\n");
    }
    return 0;
}


Compiler output:
main.c:5:10: fatal error: conio.h: No such file or directory
    5 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  int n ;
  cin >> n  ;
  string s ;
  cin >> s  ;
 
  if(n%2 != 0){
  cout << "No" << endl ;
  return 0 ;  
  }
  
  string former , latter ;
  former = str.substr(0,n/2) ;
  latter = str.substr(n/2) ;
  
  if(former==latter){
      cout << "Yes" << endl ;
      return 0 ;  
  }else{
      cout << "No" << endl ;
      return 0 ;  
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'str' was not declared in this scope; did you mean 'std'?
   18 |   former = str.substr(0,n/2) ;
      |            ^~~
      |            std
Language: C++

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

int main(){
  string a;
  int N;
  int torf=0;
  cin>>N;
  cin>>a;
  if(N%2==1)cout<<"No"<<endl;
  else{
    N/=2;
    for(int i=0;i<N;i++){
      if(a[i]!=a[n+i])torf=1;
    }
    if(torf==1)cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: 'n' was not declared in this scope
   14 |       if(a[i]!=a[n+i])torf=1;
      |                  ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
 
int main() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  int length = S.length();
  int ans = 0;
  for (int i = 0; i < length; ++i) {
    if (s[i] != S[i+length]) {
      ++ans;
      break;
    }
  }
  if (ans == 0) {
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 's' was not declared in this scope
   13 |     if (s[i] != S[i+length]) {
      |         ^
Language: C++

#include <cmath>
#include<iostream>
#include <functional>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <iomanip>
using namespace std;
 
int main(){    
  int N,count=0;
  string S;
  cin >> N >> S;

  for(int i=0;i<N/2;i++){
  if(S[i] == S[N/2+i]){
    count++;
  }
  }
  if(N%2=1){
  cout << "No" << endl;
  return 0;
  }

  if(count == N/2){
  cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: lvalue required as left operand of assignment
   22 |   if(N%2=1){
      |      ~^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n; cin >> s;
    string s; cin >> s;
    if (n & 1) {
        cout << "No" << endl;
        return 0;
    }
    for (int i = 0; i < n / 2; i++) {
        if (s[i] != s[i + n / 2]) return (cout << "No" << endl, 0);
    }
    cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 's' was not declared in this scope
    8 |     int n; cin >> s;
      |                   ^
Language: C++

#include <cmath>
#include<iostream>
#include <functional>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <iomanip>
using namespace std;
 
int main(){    
  int N;
  string S;
  cin >> N >> S;

  for(int i=0;i<N/2;i++){
  if(S[i] == S[N/2+i]){
    count++;
  }
  }
  if(N%2=1){
  cout << "No" << endl;
  return 0;
  }

  if(count == N/2){
  cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: no post-increment operator for type
   19 |     count++;
      |          ^~
a.cc:22:7: error: lvalue required as left operand of assignment
   22 |   if(N%2=1){
      |      ~^~
a.cc:27:12: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   27 |   if(count == N/2){
      |      ~~~~~~^~~~~~
Language: C++

#include <iostream>
#includ <string>
using namespace std;
int main(){
  int n;
  cin>>n;
string s;
  cin>>s;
  for(int i=0;i<n;i++){
  	if(s[i]!=s[n-i-1])
      return cout<<"NO",0;
  }
  cout<<"YES";
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #includ; did you mean #include?
    2 | #includ <string>
      |  ^~~~~~
      |  include
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    string s;
    cin >> n;
    cin >> s;
    if(n&1){
        cout << "NO";
        return 0;
    }
    int flag=0;
    else{
        for(int i=0; i<n/2; i++){
            if(s[i]!=s[i+n/2]){
                flag=1;
            }
        }
        if(flag){
            cout << "NO";
        }
        else
            cout << "YES";
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else{
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    string s;
    cin >> n;
    cin >> s;
    if(n&1){
        cout << "NO";
        return 0;
    }
    else{
        for(int i=0; i<n/2; i++){
            if(s[i]!=s[i+n/2]){
                flag=1;
            }
        }
        if(flag){
            cout << "NO";
        }
        else
            cout << "YES";
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'flag' was not declared in this scope
   15 |                 flag=1;
      |                 ^~~~
a.cc:18:12: error: 'flag' was not declared in this scope
   18 |         if(flag){
      |            ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long  
#define mod 1000000007
#define am 998244353
#define INFi 2147483647
#define INFl 9223372036854775807LL
#define fi first
#define se second
#define be begin()
#define en end()
int abs(int a,int b){ 
  int c=max(a,b)-min(a,b);
  return c;
}
int gcd(int a,int b){//最大公約数
  int c=a%b;
  while(true){
    if(c==0) break;
    a=b;
    b=c;
    c=a%b;
  }
  return b;
}
bool IsPrime(int num){
  if (num < 2) return false;
  else if (num == 2) return true;
  else if (num % 2 == 0) return false;
  double sqrtNum = sqrt(num);
  for(int i=3;i<=sqrtNum;i+=2){
    if(num%i==0){
      return false;
    }
  }
}
int lcm(int a,int b){//最小公倍数
    return (a*b)/gcd(a,b);
}	    
string w[1000];
queue<pair<int,int> > q;
signed main(){
// __builtin_ctz(N);      Nを２で何回割り切れるかを返す
//(n+1)*n/2;              １からNまでの総和を求める式
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a,c=0;
    string b;
    cin>>a>>b;
    for(int i=0;i<()a+1)/2;i++){
    if(b[i]!=b[i+(a+1)/2]) c=1;
    }
    if(c||a==1) cout<<"No";
    else cout<<"Yes";
    cout<<"\n";
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:20: error: expected primary-expression before ')' token
   50 |     for(int i=0;i<()a+1)/2;i++){
      |                    ^
a.cc:50:21: error: expected ';' before 'a'
   50 |     for(int i=0;i<()a+1)/2;i++){
      |                     ^
      |                     ;
a.cc:50:25: error: expected primary-expression before '/' token
   50 |     for(int i=0;i<()a+1)/2;i++){
      |                         ^
a.cc:50:28: error: 'i' was not declared in this scope
   50 |     for(int i=0;i<()a+1)/2;i++){
      |                            ^
a.cc: In function 'bool IsPrime(long long int)':
a.cc:36:1: warning: control reaches end of non-void function [-Wreturn-type]
   36 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#define Fori(g) for(int i=0;i<g;i++)
#define	Forj(g) for(int j=0;j<g;j++)
#define min(aa,bb) return (aa<bb)?aa:bb
#define max(aa,bb) return (aa<bb)?bb:aa

int main(){
	int n;
	char s[100];
	scanf("%d",&n);
	scanf("%s",s);
	int j=n/2;
	for(int i=0;i<n/2;i++){
		if(s[i]==s[j])flag++;
		j++;
	}
	if(flag==n/2)printf("Yes\n");
	else printf("No\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:31: error: 'flag' undeclared (first use in this function)
   15 |                 if(s[i]==s[j])flag++;
      |                               ^~~~
main.c:15:31: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String S = sc.next();
        if(N % 2 != 0){
            System.out.println("No");
            return;
        }
        String T = S.substring(N/2);
        String S2 = T + T;
        if( S2.equals(S) ){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a;
  cin >> a;
  int s[n+1];
  cin >> s;
  if(a%2==1){
    cout << "No" << endl;
    return 0;
  }
  int b=a/2;
  for(int i=0;i<b;i++){
    if(s[i]!=s[i+b]){
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'n' was not declared in this scope
    6 |   int s[n+1];
      |         ^
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
Language: C++

#include <iostream>
using namespace std;

int n;
string st;

int main() {
	cin >> n >> string;
  	if (n % 2) {
      cout << "No" << endl;
  		return 0;
	}
  	for (int i = 0; i < n; i++)
      	if (st[i] != st[n / 2 + i]) {
          	cout << "No" << endl;
  			return 0;
        }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: expected primary-expression before ';' token
    8 |         cin >> n >> string;
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main()
{
    FIO;
    int n,i;
    string s;
    cin>>n>>s;
    if(n&1)
    {
        cout<<"No"<<endl;
        return 0;
    }
    for(i=0,j=n/2; i<n/2; i++,j++)
        if(s[i]!=s[j])
        {
            cout<<"No"<<endl;
            return 0;
        }
    cout<<"Yes"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'j' was not declared in this scope
   15 |     for(i=0,j=n/2; i<n/2; i++,j++)
      |             ^
Language: C++

import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception{
		new Main(new Scanner(System.in), System.out, System.err).exec();
	}
	public final Scanner sc;
	public final PrintStream out, err;
	public Main(final Scanner sc, final PrintStream out, final PrintStream err) {
		this.sc = sc;this.out = out;this.err = err;
	}
	static private final long pair(int a, int b) {return (((long)a) << 32) + b;}
	static private final int upper(long v) {return (int)(v >> 32);}
	static private final int lower(long v) {return (int)(v & 0xFFFFFFFF);}

	//-----------------------------------------

	static private final long load(int end, int length) {
		return pair(end, length);
	}
	static private final int end(long load) {
		return upper(load);
	}
	static private final int length(long load) {
		return lower(load);
	}
	static private final long score(int count, int last) {
		return pair(count, last);
	}
	static private final int count(long score) {
		return upper(score);
	}
	static private final int last(long score) {
		return lower(score);
	}

	//------------------------------------------

	public void exec() throws Exception{
		final int N = sc.nextInt();
		final String S = sc.next();
		if(N%2 == 1) {
			out.println("No");
			return;
		}
		for(int i=0;i<N/2;i++) {
			if(S.charAt(i)!=S.charAt(i+N/2)) {
				out.println("No");
				return;
			}
		}
		out.println("Yes");
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintStream;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	//freopen("","r",stdin);
	//freopen("","w",stdout);
	int n;
	cin>>n;
	string a;
	cin>>a;
	if(n%2==0){
		cout<<"NO";
		return 0;
	}
	string t1,t2;
	t1=s.substr(0,n/2);
	t2=s.substr(n/2,n/2);
	if(t1==t2){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 's' was not declared in this scope
   15 |         t1=s.substr(0,n/2);
      |            ^
Language: C++

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

   
int main() {
    int n;
    string s;
    cin>>n>>s;
    if(n&1)cout<<"No\n";
    else
    {
        int flag=1;
        for(int i=0;i<n/2;i++)
        {
            if(s[i]!=s[i+n/2]){flag=0;break;}
        }
        if(flag)cout<<"Yes\n";
        else cout<<"No\n";
    }
    
    return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

#define rep(i, j) for (int i = 0; i < j; i++)
#define all(obj) (obj).begin(), (obj).end()
#define rall(obj) (obj).rbegin(), (obj).rend()
typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<pii> vpii;

int main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout << fixed;

    int n; string s;
    cin >> n >> s;

    if (n % 2 > 0) {
        cout << "No" << endl;
        return 0;
    }

    string subs = s.substr(0, n / 2);
    if (subs == s.substr(n / 2, n / 2)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

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

#define rep(i, j) for (int i = 0; i < j; i++)
#define all(obj) (obj).begin(), (obj).end()
#define rall(obj) (obj).rbegin(), (obj).rend()
typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<pii> vpii;

int main() {

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout << fixed;

    int n; string s;
    cin >> n >> s;

    if (n % 2 > 0) {
        cout << "No" << endl;
        return 0;
    }

    string subs = s.substr(0, n / 2);
    if (subs == s.substr(n / 2, n / 2)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

    return 0;
}


Compiler output:
a.cc:51:5: error: redefinition of 'int main()'
   51 | int main() {
      |     ^~~~
a.cc:14:5: note: 'int main()' previously defined here
   14 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <queue>
#include <tuple>
#include <map>
#include <set>
#include <sstream>
using namespace std;
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define SORT(c) sort(ALL(x))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
const int INF = 1001001001;
const ll MOD = 998244353;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;

__attribute__((constructor))
void initial(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
}

// ll lpow(ll a, ll b){
//   if(b==0) return 1;
//   else if(b%2==0){ll memo = lpow(a,b/2); return memo*memo;}
//   else return lpow(a,b-1) * a;
// }

ll kyori()


signed main(){
	int n; cin>>n;
	string s; cin>>s;

	if(n%2) return cout<<"No"<<endl,0;
	rep(i,n/2){
		cerr << i SP s[i] SP s[i+n/2] << endl;
		if(s[i]!=s[i+n/2]) return cout<<"No"<<endl,0;
	}
	cout << "Yes" << endl;


  return 0;
}


Compiler output:
a.cc:58:1: error: expected initializer before 'signed'
   58 | signed main(){
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ll;
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(v, n) sort(v, v+n)
#define VSORT(v) sort(v.begin(), v.end())
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define INF 999999999
const double EPS = 1e-10;
const double PI  = acos(-1.0);
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int n;
    string s;
    cin >> a >> s;
    REP(i,n/2){
        if(s.at(i)!=s.at(i+n/2)){
            cout << "No" <<endl;
            return 0;
        }
    }
    cout << "Yes"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:12: error: 'a' was not declared in this scope
   36 |     cin >> a >> s;
      |            ^
Language: C++

#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define lld long long
#define pi pair<lld,lld>
#define mod 1000000007
#define N 2000005
#define pb push_back
lld fact[N],ifact[N];
lld expo(lld a,lld b)
{
    if(b==0) return 1; if(b==1) return a%mod;
    lld z=expo(a,b/2);
    z=(z%mod*z%mod)%mod;
    if(b%2) z=(z*a)%mod;
    return z;
}
lld ncr(lld n,lld r)
{
    if(r>n) return 0;
    if(r==n) return 1;
    lld mm=fact[n]*ifact[n-r]%mod;
    mm=mm*ifact[r]%mod;
    return mm;
}
void pre(){
    fact[0] = 1;
    ifact[0] = 1;
    rep(i,1,N){
        fact[i] = i;
        fact[i] *= fact[i-1];
        fact[i] %= mod;;
        ifact[i] = expo(fact[i],mod - 2);
    }
}
vector < int > z_function ( string s ) {
    int n = (int)s.length();
    vector<int> z(n);
    for (int i = 1,l=0,r=0;i<n;++i){
        if (i<=r)
            z[i] = min(r-i+1,z[i-l]);
        while(i+z[i]<n&&s[z[i]]==s[i+z[i]])
            ++z[i];
        if(i+z[i]-1>r)
            l=i,r=i+z[i]-1;
    }
    return z ;
}

lld max(lld a,lld b){return a>b?a:b;}

int main()
{
   // pre();
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    // freopen("/home/ankit/input_10.txt","r",stdin);
    // freopen("/home/ankit/out10.txt","w",stdout);
    lld n;
    cin>>s;
    string s;
     cin>>s;
     if(n%2)
     {
        printf("No\n");
        return 0;
     }
     int f=0;
     for(int i=n/2;i<n;++i)
     {
        if(s[i]!=s[i-n/2])f=1;
     }
     if(f)
     {
        printf("No\n");
     }
     else
     {
        printf("Yes\n");
     }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:10: error: 's' was not declared in this scope
   60 |     cin>>s;
      |          ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define FOR(n) for(int i=0;i<n;i++)
#define FORJ(n) for(int j=0;j<n;j++)
#define PRN(n) printf("%d\n",n)
#define PRF(n) printf("%lf\n",n)
#define PRL(n) printf("%lld\n",n)
#define PRS(s) printf("%s\n",s)
#define PRC(c) printf("%c",c)
#define INF 10000000000
#define mod 1000000007
typedef long long int ll;
ll u(const void *a, const void *b){return *(ll*)a-*(ll*)b;}
ll d(const void *a, const void *b){return *(ll*)b-*(ll*)a;}
ll min(ll a,ll b){
  if(a>b)return b;
  return a;
}
ll max(ll a,ll b){
  if(a>b)return a;
  return b;
}
ll gcd(ll a,ll b){
  if(!b)return a;
  return gcd(b,a%b);
}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
int kt(ll a){
  int sum=0;
  while(a){
    a/=10;
    sum++;
  }
  return sum;
}
int ks(ll a){
  int sum=0;
  while(a){
    sum+=a%10;
    a/=10;
  }
  return sum;
}
ll f(ll a){
  return a*(a+1)/2;
}
int main(void){
  char s[101];
  scanf("%s",s);
  int l=strlen(s);
  FOR(l/2){
    if(s[i]!=s[i+l/2]){
      PRS("No");
      return 0;
    }
  }
  i(l%2){
    PRS("No");
    return 0;
  }
  PRS("Yes");
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:59:3: error: implicit declaration of function 'i' [-Wimplicit-function-declaration]
   59 |   i(l%2){
      |   ^
main.c:59:9: error: expected ';' before '{' token
   59 |   i(l%2){
      |         ^
      |         ;
Language: C++

// SeeAlso: https://atcoder.jp/contests/abc144/tasks/abc145_b

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

#define MAX 100000
#define NIL -1
#define MOD 1000000007

typedef int _loop_int;
#define rep(i,n) for(int i = 0; i < n; i++)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define debug(x) cout<<#x<<": "<<x<<endl
#define debig_vec(v) cout<<#v<<":";rep(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

// 最大公約数
inline constexpr ll gcd(ll a,ll b){if(!a||!b)return 0;while(b){ll c=b;b=a%b;a=c;}return a;}
// 最小公倍数
inline constexpr ll lcm(ll a,ll b){if(!a||!b)return 0;return a*b/gcd(a,b);}

#define print2D(h, w, arr) rep(i, h) { rep(j, w) cout << arr[i][j] << " "; cout << endl; }
template<class T> void print(const T& x){cout << setprecision(12) << x << endl;}
template<class T, class... A> void print(const T& first, const A&... rest) { cout << first << " "; print(rest...); }

int main() {
    int n;
    string s;
    cin >> n;
    cin >> s;
    bool flag = true;
    rep(i, (n/2)) {
        if(s[i] != s[i+n/2]) {
            flag =false;
        }
    }

    if(n%2=1) {
        flag = false;
    }
    print(flag?"Yes":"No");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:9: error: lvalue required as left operand of assignment
   47 |     if(n%2=1) {
      |        ~^~
Language: C++

#include "bits/stdc++.h"
#define MAXN 100009
#define INF 1000000007
#define mp(x,y) make_pair(x,y)
#define all(v) v.begin(),v.end()
#define pb(x) push_back(x)
#define wr cout<<"----------------"<<endl;
#define ppb() pop_back()
#define tr(ii,c) for(__typeof((c).begin()) ii=(c).begin();ii!=(c).end();ii++)
#define ff first
#define ss second
#define my_little_dodge 46
#define debug(x)  cerr<< #x <<" = "<< x<<endl;
using namespace std;

typedef long long ll;
typedef pair<int,int> PII;
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
int main(){
	string s;
	cin>>s;
	if(int(s.size())%2==0 and ]s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2))
		puts("Yes");
	else
		puts("No");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:35: error: expected primary-expression before ']' token
   23 |         if(int(s.size())%2==0 and ]s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2))
      |                                   ^
a.cc:23:34: error: expected ')' before ']' token
   23 |         if(int(s.size())%2==0 and ]s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2))
      |           ~                      ^~
      |                                  )
a.cc:23:35: error: expected primary-expression before ']' token
   23 |         if(int(s.size())%2==0 and ]s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2))
      |                                   ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <stack>
#include <iomanip>
using namespace std;
#define all(x) x.begin(), x.end()
typedef vector <int> vi;
typedef pair<int,int> ii;
typedef long long ll;
typedef long double ld;
const int mod = 1e9 + 7;
const ll inf = 3e18 + 5;
int add(int a, int b) { return (a += b) < mod ? a : a - mod; }
int mul(int a, int b) { return 1LL * a * b % mod; }
int sub(int a, int b) { return (a -= b) < 0 ? a + mod : a; }
int ctz(int x) { return __builtin_ctz(x); }
int clz(int x) { return __builtin_clz(x); }

int main(){
  ios_base::sync_with_stdio(false); cin.tie(0);
  #ifdef LOCAL
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  int n;
  cin >> s;
  if(n % 2 == 1) return cout << "No", 0;
  string x = s.substr(0, n / 2);
  string y = s.substr(n / 2, n / 2);
  cout << (x == y ? "Yes" : "No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:10: error: 's' was not declared in this scope
   45 |   cin >> s;
      |          ^
Language: C++

#!/usr/bin/python3
#coding: utf-8

import math

N = int(input())
P = [[int(x) for x in input().split()] for _ in range(N)]


def calc(path):
    r = 0
    for i in range(len(path) - 1):
        p1 = P[path[i-1]]
        p2 = P[path[i]]
        dx = p1[0] - p2[0]
        dy = p1[1] - p2[1]
        r += math.sqrt(dx*dx + dy*dy)
    return r

ret = 0
numret = 0
def rec(path, rest):
    if not rest:
        global ret
        global numret
        ret += calc(path)
        numret += 1
        return
    for i in range(len(rest)):
        rec(path + [rest[i]],  rest[:i] + rest[i+1:])

rec([], [i for i in range(N)])
print(ret/numret)


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/python3
      |  ^
a.cc:2:2: error: invalid preprocessing directive #coding
    2 | #coding: utf-8
      |  ^~~~~~
a.cc:4:1: error: 'import' does not name a type
    4 | import math
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int fact(int n){
  while(n>1){ 
  return n*fact(n-1);
  }
};
  

int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
 };
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_permutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10f",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: a function-definition is not allowed here before '{' token
   20 |  int dist(int i,int j){
      |                       ^
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | };
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  }
};
  

int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
 };
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_permutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10f",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: a function-definition is not allowed here before '{' token
   20 |  int dist(int i,int j){
      |                       ^
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | };
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  }
}
  

int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
 };
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_permutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10f",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: a function-definition is not allowed here before '{' token
   20 |  int dist(int i,int j){
      |                       ^
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  };
}
  

int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
 }
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_permutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10f",ans);
}



  
 


Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: a function-definition is not allowed here before '{' token
   20 |  int dist(int i,int j){
      |                       ^
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  }
}
  

  
int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
 }
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_permutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10f",ans);
}



  
 


Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: a function-definition is not allowed here before '{' token
   21 |  int dist(int i,int j){
      |                       ^
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  }
}
  

  
int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
 }
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_perutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10f",ans);
}



  
 


Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: a function-definition is not allowed here before '{' token
   21 |  int dist(int i,int j){
      |                       ^
a.cc:31:9: error: 'next_perutation' was not declared in this scope
   31 |  }while(next_perutation(p.begin(),p.end()));
      |         ^~~~~~~~~~~~~~~
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  }
}
  
int dist(int i,int j){
   int dx=x[i]-x[j];
   int dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
}
  
int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_perutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10d",ans);
}



  
 


Compiler output:
a.cc: In function 'int dist(int, int)':
a.cc:13:11: error: 'x' was not declared in this scope; did you mean 'dx'?
   13 |    int dx=x[i]-x[j];
      |           ^
      |           dx
a.cc:14:11: error: 'y' was not declared in this scope; did you mean 'dy'?
   14 |    int dy=y[i]-y[j];
      |           ^
      |           dy
a.cc:15:19: error: invalid type argument of unary '*' (have 'int')
   15 |    return sqrt(dx**2+dy**2);
      |                   ^~
a.cc:15:25: error: invalid type argument of unary '*' (have 'int')
   15 |    return sqrt(dx**2+dy**2);
      |                         ^~
a.cc: In function 'int main()':
a.cc:30:9: error: 'next_perutation' was not declared in this scope
   30 |  }while(next_perutation(p.begin(),p.end()));
      |         ^~~~~~~~~~~~~~~
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

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

int fact(int n){
  while(n>2){ 
  return n*fact(n-1);
  }
}
  
  
int dist(int i,int j){
   dx=x[i]-x[j];
   dy=y[i]-y[j];
   return sqrt(dx**2+dy**2);
}
  
int main(){ 
 int n;
 int dist(int i,int j);
 cin >> n;
 vector<int> x(n),y(n),p(n);
 rep(i,n) cin >> x[i] >> y[i];
 rep(i,n) p[i]=i;
 double len=0;
 do{
   rep(i,n-1){
     len += dist(p[i],p[i+1]);
   }
 }while(next_perutation(p.begin(),p.end()));
  
 double ans=len/fact(n);
 printf("%.10d",ans);
}



  
 


Compiler output:
a.cc: In function 'int dist(int, int)':
a.cc:14:4: error: 'dx' was not declared in this scope
   14 |    dx=x[i]-x[j];
      |    ^~
a.cc:14:7: error: 'x' was not declared in this scope
   14 |    dx=x[i]-x[j];
      |       ^
a.cc:15:4: error: 'dy' was not declared in this scope
   15 |    dy=y[i]-y[j];
      |    ^~
a.cc:15:7: error: 'y' was not declared in this scope
   15 |    dy=y[i]-y[j];
      |       ^
a.cc:16:19: error: invalid type argument of unary '*' (have 'int')
   16 |    return sqrt(dx**2+dy**2);
      |                   ^~
a.cc:16:25: error: invalid type argument of unary '*' (have 'int')
   16 |    return sqrt(dx**2+dy**2);
      |                         ^~
a.cc: In function 'int main()':
a.cc:31:9: error: 'next_perutation' was not declared in this scope
   31 |  }while(next_perutation(p.begin(),p.end()));
      |         ^~~~~~~~~~~~~~~
a.cc: In function 'int fact(int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^