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

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

#define mod (int)1e9+7
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define pb push_back
#define make_pair mp
#define pi acos(-1)
int gcd(int a,int b)
{
    if(b==0)
    {
        return a;
    }
    return gcd(b,a%b);

}

int main()
{
   int n;
   cin>>n;
   if(n%2!=0)
   {
       cout<<"No"<<endl;
       return 0;
   }
   string s,t,k;
   cin>>s;

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

   }
   cout<<"Yes"<<endl;
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  bool f = true;
  string S;
  cin >> N >> S;
  int l;
  l = S.size();
  for (int i = 0; i < l / 2; i++){
    if ( S.at(i) != S.at(l + i){
      cout << "No" << endl;
      f = false;
    }
    if (f == false) break;
  }
  if (f == true){     
    cout << "Yes";
  }
    
        
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before '{' token
   12 |     if ( S.at(i) != S.at(l + i){
      |                                ^
      |                                ;
a.cc:16:5: error: expected primary-expression before 'if'
   16 |     if (f == false) break;
      |     ^~
a.cc:15:6: error: expected ')' before 'if'
   15 |     }
      |      ^
      |      )
   16 |     if (f == false) break;
      |     ~~
a.cc:12:8: note: to match this '('
   12 |     if ( S.at(i) != S.at(l + i){
      |        ^
Language: C


#include <stdio.h>

int main()
{
	int a;
	scanf("%d", &a);

	char b[a + 1];
	scanf("%s", b);

	if (n % 2 == 1) {
		puts("No");
		return 0;
	}
	for (int i = 0; i < (n / 2); i++) {
		if (b[0 + i] != b[n / 2 + i]) {
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: 'n' undeclared (first use in this function)
   12 |         if (n % 2 == 1) {
      |             ^
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include<cstring);

using namespace std;

int main()
{
   int n;
   string s,t,d;
   cin>>n;
   cin>>s;
  if(strlen(s)=1)
    cout<<"No";
  else
  {
    for(int i=0;i<(n/2);i++)
   {
       t[i]=s[i];
   }
   int j=0;
    for(int i=n/2;i<n;i++)
   {
       d[j]=s[i];
       j++;
   }
   if(t==d)
   cout<<"Yes";
   else
   cout<<"No";
  }
   

   return 0;
}

Compiler output:
a.cc:2:19: error: missing terminating > character
    2 | #include<cstring);
      |                   ^
a.cc:2:9: fatal error: cstring);: No such file or directory
    2 | #include<cstring);
      |         ^
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,a,b,c;
	string s;
	cin>>n;
	getline(cin,s);
	if(n%2==1){
		cout<<"No";
		return 0;
	}
	else{
		a=n/2;
		b=s.substr(0,a);
		c=s.substr(a);
		if(b==c){
			cout<<"Yes";
		}
		else
		    cout<<"No";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
   14 |                 b=s.substr(0,a);
      |                   ~~~~~~~~^~~~~
      |                           |
      |                           std::__cxx11::basic_string<char>
a.cc:15:27: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
   15 |                 c=s.substr(a);
      |                   ~~~~~~~~^~~
      |                           |
      |                           std::__cxx11::basic_string<char>
Language: C++

#include <iostream>
using namespace std;

int main(){
	int n;
  char s[200];
  
  cin >> n;
  
  for(int i=0; i<n; ++i){
  	cin >> s[i];
  }
  if(n%2 == 1){
  	cout << No;
    return 0;
  }
  
  int k=n/2;
  int ans=0;
  for(int i=0; i<k; i++){
  	if(s[i] == s[k+i]) ans++;
  }
  if(ans != k) {
  cout << "No";
    return 0;
  }
  
  cout << Yes;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'No' was not declared in this scope
   14 |         cout << No;
      |                 ^~
a.cc:28:11: error: 'Yes' was not declared in this scope
   28 |   cout << Yes;
      |           ^~~
Language: C++

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



Compiler output:
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | string　str[n];
      | ^
a.cc: In function 'int main()':
a.cc:8:3: error: break statement not within loop or switch
    8 |   break;
      |   ^~~~~
a.cc:10:1: error: 'string\U00003000str' was not declared in this scope
   10 | string　str[n];
      | ^~~~~~~~~~~
a.cc:12:10: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |   cin >> str[i];
      |          ^~~
      |          std
a.cc:15:6: error: 'str' was not declared in this scope; did you mean 'std'?
   15 |   if(str[i]!=str[2*n]){
      |      ^~~
      |      std
Language: C++

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



Compiler output:
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | char　str[n];
      | ^
a.cc: In function 'int main()':
a.cc:8:3: error: break statement not within loop or switch
    8 |   break;
      |   ^~~~~
a.cc:10:1: error: 'char\U00003000str' was not declared in this scope
   10 | char　str[n];
      | ^~~~~~~~~
a.cc:12:10: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |   cin >> str[i];
      |          ^~~
      |          std
a.cc: At global scope:
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for(int i=1;i<=n/2;i++){
      | ^~~
a.cc:14:13: error: 'i' does not name a type
   14 | for(int i=1;i<=n/2;i++){
      |             ^
a.cc:14:20: error: 'i' does not name a type
   14 | for(int i=1;i<=n/2;i++){
      |                    ^
a.cc:20:1: error: 'cout' does not name a type
   20 | cout << "Yes" << endl;
      | ^~~~
a.cc:21:1: error: expected unqualified-id before 'return'
   21 | return 0;
      | ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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



Compiler output:
a.cc:9:1: error: extended character 　 is not valid in an identifier
    9 | char　str[n];
      | ^
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if(n%2==1){
      | ^~
a.cc:8:1: error: 'cin' does not name a type
    8 | cin >> n;
      | ^~~
a.cc:9:1: error: 'char\U00003000str' does not name a type
    9 | char　str[n];
      | ^~~~~~~~~
a.cc:10:1: error: expected unqualified-id before 'for'
   10 | for(int i=1;i<=n;i++)
      | ^~~
a.cc:10:13: error: 'i' does not name a type
   10 | for(int i=1;i<=n;i++)
      |             ^
a.cc:10:18: error: 'i' does not name a type
   10 | for(int i=1;i<=n;i++)
      |                  ^
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
a.cc:13:1: error: expected unqualified-id before 'for'
   13 | for(int i=1;i<=n/2;i++){
      | ^~~
a.cc:13:13: error: 'i' does not name a type
   13 | for(int i=1;i<=n/2;i++){
      |             ^
a.cc:13:20: error: 'i' does not name a type
   13 | for(int i=1;i<=n/2;i++){
      |                    ^
a.cc:19:1: error: 'cout' does not name a type
   19 | cout << "Yes" << endl;
      | ^~~~
a.cc:20:1: error: expected unqualified-id before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++


#include <iostream>
using namespace std;
int main()
{
    string a;
    int n;
    cin >> n;
    cin >> a;
    if (n % 2 == 1)
    {
        cout << "No";
        return 0;
    }
    else
    {
        string b = "", c = "";
        for (int i = 0; i < n / 2; i++)
        {
            b += a[i];
        }
        for (int i = n / 2; i < n; i++)
        {
            c += a[i];
        }
    }
    if (b == c)
    {
        cout << "yes";
        return 0;
    }
    else
    {
        cout << "no";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'b' was not declared in this scope
   27 |     if (b == c)
      |         ^
a.cc:27:14: error: 'c' was not declared in this scope
   27 |     if (b == c)
      |              ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  for(int i=0; i<n/2; i++) {
    if(n[i]!=n[i+n/2]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: invalid types 'int[int]' for array subscript
    8 |     if(n[i]!=n[i+n/2]) {
      |         ^
a.cc:8:15: error: invalid types 'int[int]' for array subscript
    8 |     if(n[i]!=n[i+n/2]) {
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>](T))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |     if(S=T+T){
      |        ~^~~~
      |         |
      |         std::__cxx11::basic_string<char>
Language: C++

//author: dazhong_feliks

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

int main() { 
  int N;
  string S;

  cin >> N >> S;
 
 if(N % 2 != 0);
  cout << "No";

 else{
   string ans = "Yes";
   for(int i=0; i<N/2; i++){
     if(S.at(i) != S.at(i + N / 2)){
     ans = "No";
     break;
   }
 }
  cout << ans << endl;
}
}
     

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

//author: dazhong_feliks

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

int main() { 
  int N;
  string S;

  cin >> N >> S;
 
 if(S.size() % 2 != 0);
  cout << "No";

  else{
   int ans = "Yes";
   int z = S.size() / 2;

   for(int i=0; i<N/2; i++){
     if(S.at(i) != S.at(i + z))
     ans = "No";
     break;
   }
  }

  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else{
      |   ^~~~
a.cc:16:14: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   16 |    int ans = "Yes";
      |              ^~~~~
      |              |
      |              const char*
a.cc:21:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   21 |      ans = "No";
      |            ^~~~
      |            |
      |            const char*
a.cc:26:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  string S;
  bool a=1;
  cin >> N >> S;
  while(a){
    if(N % 2 == 0){
      for(int i=0; i<N/2; i++){
        for(int j=N/2; j<N; j++){
          if(S[i]!=S[j]){
            a=0;
            break;
          }
        }
      }
    }else{
      a=0;
      break;
  }
  if(a==1) cout << "Yes" << endl;
  if(a==0) cout << "No" << endl;
}


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

#include <bits/stdc++.h>

using namespace std;

int n;
char s[103];

int main()
{
	n = gi();
  	scanf("%s", s + 1);
  	if (n & 1) {puts("No"); return 0;}
  	for (int i = 1; i <= n / 2; i+=1)
    {
    	if (s[i] != s[i + n / 2]) {puts("No"); return 0;}
    }
  	puts("Yes");
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'gi' was not declared in this scope
   10 |         n = gi();
      |             ^~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main (){
  int n;
  string s;
  string a;
  cin >> n >> s;
  a = s.substr(n / 2);
  if(s == a + a ){ 
    cout << ”Yes” << endl;
  } 
  else cout << ”No” << endl;
  return 0;
}

Compiler output:
a.cc:11:13: error: extended character ” is not valid in an identifier
   11 |     cout << ”Yes” << endl;
      |             ^
a.cc:11:13: error: extended character ” is not valid in an identifier
a.cc:13:16: error: extended character ” is not valid in an identifier
   13 |   else cout << ”No” << endl;
      |                ^
a.cc:13:16: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:13: error: '\U0000201dYes\U0000201d' was not declared in this scope
   11 |     cout << ”Yes” << endl;
      |             ^~~~~
a.cc:13:16: error: '\U0000201dNo\U0000201d' was not declared in this scope
   13 |   else cout << ”No” << endl;
      |                ^~~~
Language: Java

import java.util.*;

public class Main{

public static void main(String[] args){
Scanner obj=new Scanner(System.in);
int n=obj.nextInt();
String g=obj.next();
if(n%2==0){
System.out.println("No");
}else{
int p=n/2;
int q=p;
int h=0;
boolean flag=true;

for(;h<p;h++,q++){

if(s.charAt(h)!=s.charAt(q)){
flag=false;
}

}

if(flag){

System.out.println("Yes");
}else{
System.out.println("No");
}
}

}

}

Compiler output:
Main.java:19: error: cannot find symbol
if(s.charAt(h)!=s.charAt(q)){
   ^
  symbol:   variable s
  location: class Main
Main.java:19: error: cannot find symbol
if(s.charAt(h)!=s.charAt(q)){
                ^
  symbol:   variable s
  location: class Main
2 errors
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
	int len,r;
	char s[100],a[100],b[100];
	scanf("%d", &len);
	scanf("%s",s);

	if(len==2 && s[0]==s[1])
        printf("Yes");
    else if(len==2 && s[0]!=s[1])
        printf("No");
    else
    if(len%2==0)
    {   strncpy(a,s,len/2);
        strrev(s);
        strncpy(b,s,len/2);

        r=strcmp(a,strrev(b));

        if(r==0)
       {
           printf("Yes");
       }
        else
       {
           printf("No");
       }
    }

    else
        printf("No");

    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:17:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
   17 |         strrev(s);
      |         ^~~~~~
      |         strsep
main.c:20:20: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   20 |         r=strcmp(a,strrev(b));
      |                    ^~~~~~~~~
      |                    |
      |                    int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C

#include <stdio.h>
#include <string.h>
int main()
{
     char arr[100], a1[100], a2[100];
      int N, i, j;
      scanf("%d%s", &N, arr);
      if (N % 2 == 0)
      {
            for (i = 0; i <= (N/2 - 1); i++)
                  a1[i] = arr[i];
             a1[i] = '\0';
             for (j = N/2; j < N; j++)
                   a2[j] = arr[j];
              a2[j] = '\0';
              if (!strcmpi(arr, strcat(a1, a2))
                  printf("Yes");
              else
                   printf("No");
        }
        else
               printf("No");
         return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:20: error: implicit declaration of function 'strcmpi'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
   16 |               if (!strcmpi(arr, strcat(a1, a2))
      |                    ^~~~~~~
      |                    strcmp
main.c:16:48: error: expected ')' before 'printf'
   16 |               if (!strcmpi(arr, strcat(a1, a2))
      |                  ~                             ^
      |                                                )
   17 |                   printf("Yes");
      |                   ~~~~~~                        
main.c:20:9: error: expected expression before '}' token
   20 |         }
      |         ^
Language: C

#include <stdio.h>
#include <string.h>
int main()
{
     char arr[100], a1[100], a2[100];
      int N, i, j;
      scanf("%d%s", &N, arr);
      if (N % 2 == 0)
      {
            for (i = 0; i < (N/2 - 1); i++)
                  a1[i] = arr[i];
             a1[i] = '\0';
             for (j = N/2; j < N; j++)
                   a2[j] = arr[j];
              a2[j] = '\0';
              if (!strcmpi(arr, strcat(a1, a2))
                  printf("Yes");
              else
                   printf("No");
        }
        else
               printf("No");
         return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:20: error: implicit declaration of function 'strcmpi'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
   16 |               if (!strcmpi(arr, strcat(a1, a2))
      |                    ^~~~~~~
      |                    strcmp
main.c:16:48: error: expected ')' before 'printf'
   16 |               if (!strcmpi(arr, strcat(a1, a2))
      |                  ~                             ^
      |                                                )
   17 |                   printf("Yes");
      |                   ~~~~~~                        
main.c:20:9: error: expected expression before '}' token
   20 |         }
      |         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	int len, i;
	char s[100], a[50], b[50];
	cin >> len;
	for (i = 0; i < len; i++)
		cin >> s[i];

	if (len % 2 == 0)
	{
		for (i = 0; i < len / 2; i++)
		{
			a[i] = b[i];
		}

		for (i = 0; i < len / 2; i++)
		{
			b[i] = s[len / 2 + i];
		}

		if (strcmp(a, b) == 1)
			cout << "Yes";
		else
			cout << "No";
	}

	else
		cout << "No";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: 'strcmp' was not declared in this scope
   24 |                 if (strcmp(a, b) == 1)
      |                     ^~~~~~
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: C++

#include<iostream>
#include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
#include<string>
int main()
{
    int N;
    cin>>N;
    string str;
    cin>>str;
    string str1,str2;
    int j,l=str.length();
    int mid = l/2;
    if(l%2==0)
        j=mid;
    else
        j=mid+1;
    str1=str.substr(0,mid);
    str2=str.substr(j,l);
    sort(str1.begin(),str1.end());
    sort(str2.begin(),str2.end());
    if(str1==str2)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    }
    return 0;
    
}


Compiler output:
a.cc:28:5: error: expected unqualified-id before 'return'
   28 |     return 0;
      |     ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
char a[50],s1[30],s2[30];
int n,b,i;
scanf("%d",&n);
gets(a);
if(n%2==1)
printf("NO");
elseif(n%2==0)
{
b=n/2;
for(i=0;i<(b-1);i++)
{
s1[i]=a[i];
}
for(i=b;i<(n-1);i++)
{
s2[i-b]=a[i];
}
}
if(strcmp(s1,s2)==0)
{
printf("YES");
}
else
printf("NO");
}


Compiler output:
main.c: In function 'main':
main.c:8:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 | gets(a);
      | ^~~~
      | fgets
main.c:11:1: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   11 | elseif(n%2==0)
      | ^~~~~~
main.c:11:15: error: expected ';' before '{' token
   11 | elseif(n%2==0)
      |               ^
      |               ;
   12 | {
      | ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int n,i,j,m,f=0;
cin>>n;
char s[n];
cin>>s;
 m=n/2;
j=m;
for(i=0;i<m;++i)
{
 if(s[i]!=s[j])
 {f=1;
  break;
}
}
if(f==1)
{
cout<<"Yes";
else
cout<<"No";




return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:1: error: expected '}' before 'else'
   21 | else
      | ^~~~
a.cc:19:1: note: to match this '{'
   19 | {
      | ^
Language: C

#include<stdio.h>
#include<string.h>
void main()
{
int n,i;
char s[100],a[50]=NULL,b[50]=NULL;
scanf("%d",&n);
scanf("%s",s);
for(i=0;i<=(n/2)-1;i++)
 a[i]=s[i];
for(i=n/2;i<=n;i++)
 b[i-(n/2)]=s[i];
if(strcmp(a,b)==0)
 printf("Yes")
else
printf("No");
}

 



Compiler output:
In file included from /usr/include/string.h:33,
                 from main.c:2:
main.c: In function 'main':
main.c:6:19: error: invalid initializer
    6 | char s[100],a[50]=NULL,b[50]=NULL;
      |                   ^~~~
main.c:6:30: error: invalid initializer
    6 | char s[100],a[50]=NULL,b[50]=NULL;
      |                              ^~~~
main.c:14:15: error: expected ';' before 'else'
   14 |  printf("Yes")
      |               ^
      |               ;
   15 | else
      | ~~~~
Language: C

#include <stdio.h>
#include <string.h>

int main(){
  int N;
  int i;
  char S[110];
  char S1[55];
  char S2[55];
  scanf("%d", &N);

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




  if (N % 2 == 0) {
    for (i = 0; i < N/2; i++) {
      S1[i] = S[i];
    }
    for (i = 0; i < N/2; i++) {
      S2[i] = S[i+ N/2];
    }
    if (strcmp(S1,S2) == 0) {
      printf("Yes\n");
    }
  }
  if (N % 2 == 1) {
    printf("No\n", );
  }


  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:31:20: error: expected expression before ')' token
   31 |     printf("No\n", );
      |                    ^
Language: C++

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

int main( )
{
    string s, t1, t2
    int l;
    cin >> l;
    cin >> s;
    t1 = s.substr(0, l / 2);
    t2 = s.substr(l / 2, l - (l / 2));
    if (t1 == t2)
        cout << "Yes\n";
    else
        cout << "No\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'int'
    7 |     int l;
      |     ^~~
a.cc:8:12: error: 'l' was not declared in this scope
    8 |     cin >> l;
      |            ^
a.cc:11:5: error: 't2' was not declared in this scope; did you mean 't1'?
   11 |     t2 = s.substr(l / 2, l - (l / 2));
      |     ^~
      |     t1
Language: C++

//shara's here
#include <bits/stdc++.h>
using namespace std;
typedef int q;
typedef double w;
typedef string s;
typedef long long ll;
int main(){
    int x; cin>>x;
    s ss; cin>>ss;
    s l,o; bool k=false;
    l=ss.substr(x/2);
    o=ss.substr(0,x/2);
    if(x&1){cout<<"No";}
    else{ if(l==o){cout<<"Yes";}else cout<<"No";
/* failed attempt 
for(int i=0;i<x/2;i++){
          l[i]=ss[i];

        }
         for(int j=x;j>x/2;j--){
                o[j]=ss[j];

            }if(o==l){k=true;}
            if(k){cout<<"yes";}
*/
return 0;}


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

#include <iostream>
#include <string>

using namespace std;

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

int main(){
  int n;
  string s;
  cin >> n >> s;
  rep(i,s.size()/2){
    if(n/2 == 1) cout << "No" << endl;
    else if(s[i] == s[i+n/2])cout << "Yes" << endl;
    else cout << "No" << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = sc.next();
    char[] c = s.toCharArray();
    
    String bf = "";
    String af = "";
    
    for(int i=0; i<n/2; i++){
      bf += c[i];
    }
    
    for(int j=n/2; j<n; j++){
      af += c[i];
    }
    
    if(bf.equals(af)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:18: error: cannot find symbol
      af += c[i];
              ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

package main

import "fmt"

func main() {
	var n int
	var s string
	_, _ = fmt.Scan(&n, &s)
	
	if s[n/2:] == s[:n/2]{
		fmt.Println("Yes")
	}else{
		fmt.Println("No")
	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  string S;
  cin >> N >>S;
  if (N%2 == 0){
    string a,b;
    a =S.substr(0,N/2);
    b =S.substr(N/2,N/2);
    if (a==b){
      cout << "Yes" << endl;
    }else{
      cout << "No" << endl;
    }
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N >>S;
      |   ^~~
a.cc:6:14: error: 'S' was not declared in this scope
    6 |   cin >> N >>S;
      |              ^
a.cc:8:11: error: expected ';' before 'a'
    8 |     string a,b;
      |           ^~
      |           ;
a.cc:9:5: error: 'a' was not declared in this scope
    9 |     a =S.substr(0,N/2);
      |     ^
a.cc:10:5: error: 'b' was not declared in this scope
   10 |     b =S.substr(N/2,N/2);
      |     ^
a.cc:12:7: error: 'cout' was not declared in this scope
   12 |       cout << "Yes" << endl;
      |       ^~~~
a.cc:12:24: error: 'endl' was not declared in this scope
   12 |       cout << "Yes" << endl;
      |                        ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout << "No" << endl;
      |       ^~~~
a.cc:14:23: error: 'endl' was not declared in this scope
   14 |       cout << "No" << endl;
      |                       ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << "No" << endl;
      |     ^~~~
a.cc:17:21: error: 'endl' was not declared in this scope
   17 |     cout << "No" << endl;
      |                     ^~~~
Language: Java

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;

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


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:6: error: not a statement
  cin >> n >> s;
           ^
Main.java:9: error: not a statement
    cout << "Yes" << endl;
                  ^
Main.java:11: error: not a statement
    cout << "No" << endl;
                 ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
6 errors
Language: Java

import java.util.Scanner;

public class B {

	public static void main(String[] args)
	{
		int N = 0;
		String S = "";

		Scanner sc1 = new Scanner(System.in);
		Scanner sc2 = new Scanner(System.in);

		N = sc1.nextInt();
		S = sc2.nextLine();

		sc1.close();
		sc2.close();

		if((N & 1) == 0)
		{
			String s1 = S.substring(0, (N / 2));
			String s2 = S.substring((N / 2), N);
			System.out.println(s1 + s2);

			if(S.equals(s1 + s2))
			{
				System.out.println("Yes");

			}
			else
			{
				System.out.println("No");
			}
		}
		else
		{
			System.out.println("No");
		}
	}
}


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

#include<string>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> N >> a;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << "No" << endl;
      |         ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:25: error: 'endl' was not declared in this scope
    9 |         cout << "No" << endl;
      |                         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:16:22: error: 'cout' was not declared in this scope
   16 |         if(i < N /2) cout << "No" << endl; else cout << "Yes" << endl;
      |                      ^~~~
a.cc:16:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:38: error: 'endl' was not declared in this scope
   16 |         if(i < N /2) cout << "No" << endl; else cout << "Yes" << endl;
      |                                      ^~~~
a.cc:16:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:16:49: error: 'cout' was not declared in this scope
   16 |         if(i < N /2) cout << "No" << endl; else cout << "Yes" << endl;
      |                                                 ^~~~
a.cc:16:49: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:66: error: 'endl' was not declared in this scope
   16 |         if(i < N /2) cout << "No" << endl; else cout << "Yes" << endl;
      |                                                                  ^~~~
a.cc:16:66: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<iostream>
#include<string>
using namespace std;
main()
{
  int n;
  if((n%2)!=0)
    cout<<"No"<<endl;
  else{
    string s,s1,s2;
    getline(cin,s);
    s1=substr(0,n/2-1);
    s2=substr(n/2);
    if(s1==s2)
      cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:8: error: 'substr' was not declared in this scope
   12 |     s1=substr(0,n/2-1);
      |        ^~~~~~
Language: Java

import java.util.Scanner;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = sc.next();
    char[] c = s.toCharArray();
    String Before = "";
    String After = "";
    
    for(int i=0; i<n/2; i++){
      Before += c[i];
    }
    
    for(int j=n/2; j<n; j++){
      After += c[i];
    }
    
    if(Before.equals(After)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:18: error: cannot find symbol
      After += c[i];
                 ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import java.util.Scanner;
import java.util.Arrays;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = sc.next();
    Char[] c = s.toCharArray();
    String Before = "";
    String After = "";
    
    for(int i=0; i<n/2; i++){
      Before += c[i];
    }
    
    for(int j=n/2; j<n; j++){
      After += c[i];
    }
    
    if(Before.equals(After)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:9: error: cannot find symbol
    Char[] c = s.toCharArray();
    ^
  symbol:   class Char
  location: class Main
Main.java:18: error: cannot find symbol
      After += c[i];
                 ^
  symbol:   variable i
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
import java.util.Array;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = sc.next();
    Char[] c = s.toCharArray();
    String Before = "";
    String After = "";
    
    for(int i=0; i<n/2; i++){
      Before += c[i];
    }
    
    for(int j=n/2; j<n; j++){
      After += c[i];
    }
    
    if(Before.equals(After)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:2: error: cannot find symbol
import java.util.Array;
                ^
  symbol:   class Array
  location: package java.util
Main.java:9: error: cannot find symbol
    Char[] c = s.toCharArray();
    ^
  symbol:   class Char
  location: class Main
Main.java:18: error: cannot find symbol
      After += c[i];
                 ^
  symbol:   variable i
  location: class Main
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class abc145_b {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        String S = br.readLine();
        if (N%2==1) {
            System.out.println("No");
        } else {
            int counter1 = 0;
            int counter2 = (N/2);
            for (int i=0; i<N/2; i++) {
                if (S.charAt(counter1)!=S.charAt(counter2)) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }
}

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

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

// @author: pashka

int main() {
    ios::sync_with_stdio(false);

    int n;
    string s;
    cin >> n >> s;
    if (n % 2 == 1) {
        cout << "No";
    } else {
        string s1 = s.substr(0, n / 2);
        string s2 = s.substr(n / 2, n / 2);
        if (s1 == s2) {
            cout << "Yes"
        } else {
            cout << "No";
        }
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: expected ';' before '}' token
   19 |             cout << "Yes"
      |                          ^
      |                          ;
   20 |         } else {
      |         ~
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main() 
{ int a;
  cin>>a; 
 string s; 
 cin>>s; 
 if(a&1) 
   cout<<"No"<<'\n'; 
 else 
 { string t=s.substr(0,a/2); 
   strig p=s.substr(a/2); 
   if(t!=s) 
   cout<<"No"<<'\n'; 
    else 
     cout<<"Yes"<<'\n';   
 }
 return 0;  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: 'strig' was not declared in this scope
   12 |    strig p=s.substr(a/2);
      |    ^~~~~
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main() 
{ int a;
  cin>>a; 
 string s; 
 cin>>s; 
 if(a&1) 
   cout<<"No"<<'\n'; 
 else 
 { string t=s.substr(0,a/r); 
   strig p=s.substr(a/r-1); 
   if(t!=s) 
   cout<<"No"<<'\n'; 
    else 
     cout<<"Yes"<<'\n';   
 }
 return 0;  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'r' was not declared in this scope
   11 |  { string t=s.substr(0,a/r);
      |                          ^
a.cc:12:4: error: 'strig' was not declared in this scope
   12 |    strig p=s.substr(a/r-1);
      |    ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  int n;
  cin >> n;
  string a;
  cin >> a;
  int yes = 0;
  for(int i = 0;i <= n - 1;i++){
    if(a[i] != a[i + n / 2]){
      yes = 1;
    } 
  }
  if(yes == 0){
    cout << Yes << endl;
  }
  else{
    cout << No << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'Yes' was not declared in this scope; did you mean 'yes'?
   16 |     cout << Yes << endl;
      |             ^~~
      |             yes
a.cc:19:13: error: 'No' was not declared in this scope
   19 |     cout << No << endl;
      |             ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 int t;
  cin>>t;
  string s;
  cin>>s;
  if(s.length()==1){
   cout<<"No"; 
  }
  else if(s==s.reverse()){
    cout<<"Yes";
  }
   else{
   	cout<<"No";
   }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
   11 |   else if(s==s.reverse()){
      |                ^~~~~~~
      |                reserve
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  string str,res;
  cin >> N >> str;
  
  res = "Yes";
  
  for (int i = 0;i<N/2;++i){
    if (N%2 == 0){
   if(str.at(i) != str.at(i+N/2)){
     res = "No";
   break;
   }
      else{
        break;
      }
  }
  cout << res << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  string str,res;
  cin >> N >> str;
  
  res = "Yes";
  
  for (int i = 0;i<n/2;++i){
   if(str.at(i) != str.at(i+N/2)){
     res = "No";
   break;
   }
  }
  cout << res << endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: return-statement with no value, in function returning 'int' [-fpermissive]
    6 |   if(n&1){cout<<"No";return;}
      |                      ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected initializer before '>>' token
    5 |   cin>>n;
      |      ^~
Language: Java

public class Main {

	public static void main(String[] args)
	{
		int N = 0;
		String S = "";

		Scanner sc1 = new Scanner(System.in);
		Scanner sc2 = new Scanner(System.in);

		N = sc1.nextInt();
		S = sc2.nextLine();

		sc1.close();
		sc2.close();

		if((N & 1) == 0)
		{
			String s = S.substring(0, (N / 2));
			if(S.equals(s + s))
			{
				System.out.println("Yes");

			}
			else
			{
				System.out.println("No");
			}
		}
		else
		{
			System.out.println("No");
		}
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
		Scanner sc1 = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc1 = new Scanner(System.in);
		                  ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
		Scanner sc2 = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
		Scanner sc2 = new Scanner(System.in);
		                  ^
  symbol:   class Scanner
  location: class Main
4 errors
Language: C++

#include<Bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin >> N;
    string str;
    cin >> str;
    bool answer = true;
    if(N % 2 != 0){
        cout << "No" << endl;
    }
    if(N % 2 == 0){
        for(int i = 0; i < N/2; i++){
            if(str.at(i) != str.at(N/2 + i)){
              answer = false;
              break;
            }
        }
    if(answer) cout << "Yes" << endl;
    if(answer == false) cout << "No" << endl;
    }
}

Compiler output:
a.cc:1:9: fatal error: Bits/stdc++.h: No such file or directory
    1 | #include<Bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int A;
  string B;
  
  cin >> A >> B;
  
  if(A/2 == 1){
    cout << "No" <<endl;
  }
  else if {
    if(B.substr(0,A/2) == B.substr(A/2,A/2)) cout << "Yes" <<endl;
    else cout << "No" << endl;
  }
}


    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected '(' before '{' token
   12 |   else if {
      |           ^
      |           (
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int A;
  string B;
  
  cin >> A >> B;
  
  if(A/2 == 1){
    cout << "No" <<endl;
  }
  else if {
    if(B.substr(0,A/2) == B.substr(A/2,A/2))
       cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected '(' before '{' token
   12 |   else if {
      |           ^
      |           (
a.cc:15:5: error: 'else' without a previous 'if'
   15 |   } else {
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected '}' at end of input
   22 |   return 0;
      |            ^
a.cc:20:9: note: to match this '{'
   20 |   }else {
      |         ^
a.cc:22:12: error: expected '}' at end of input
   22 |   return 0;
      |            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
int n; cin >> n; int f=0;
string s; cin >> s;
if(n%2==0){
    if(substr(0,n/2)==substr(n/2,n/2)){
        cout << "Yes" << endl;
    }
else cout << "No" << endl;
}
else cout << "No" << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   11 |     if(substr(0,n/2)==substr(n/2,n/2)){
      |        ^~~~~~
      |        strstr
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan =new Scanner(System.in);
    int N=scan.nextInt();
    String str=scan.nextLine();
    if(str.subsring(0,N/2).equals(str.substring(N/2+1))){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    if(str.subsring(0,N/2).equals(str.substring(N/2+1))){
          ^
  symbol:   method subsring(int,int)
  location: variable str of type String
1 error
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan =new Scanner(System.in);
    int N=scan.nextInt();
    String str=scan.nextLine();
    if(str.subSring(0,N/2).equals(str.subString(N/2+1))){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    if(str.subSring(0,N/2).equals(str.subString(N/2+1))){
          ^
  symbol:   method subSring(int,int)
  location: variable str of type String
Main.java:8: error: cannot find symbol
    if(str.subSring(0,N/2).equals(str.subString(N/2+1))){
                                     ^
  symbol:   method subString(int)
  location: variable str of type String
2 errors
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan =new Scanner(System.in);
    int N=scan.nextInt();
    String str=scan.nextLine();
    if(str.subSring(0,N/2).equals(str.subString(N/2+1,N))){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    if(str.subSring(0,N/2).equals(str.subString(N/2+1,N))){
          ^
  symbol:   method subSring(int,int)
  location: variable str of type String
Main.java:8: error: cannot find symbol
    if(str.subSring(0,N/2).equals(str.subString(N/2+1,N))){
                                     ^
  symbol:   method subString(int,int)
  location: variable str of type String
2 errors
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan =new Scanner(System.in);
    int N=scan.nextInt();
    String str=scan.nextLine();
    if(str.subSring(0,N/2).equals(str.subString(N/2+1,N))){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
}

Compiler output:
Main.java:13: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scan =new Scanner(System.in);
    int N=scan.nextInt();
    String str=scan.nextLine();
    if(str.subSring(0,N/2).equals(str.subString(N/2+1,N)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
}

Compiler output:
Main.java:8: error: ')' expected
    if(str.subSring(0,N/2).equals(str.subString(N/2+1,N)){
                                                         ^
Main.java:13: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
/* Name of the class has to be "Main" only if the class is public. */


/* Name of the class has to be "Main" only if the class is public. */
public class Main{
    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner s=new Scanner(System.in);
        int t=s.nextInt();
        String ss=s.nextLine();
        if(t%2==1)
        System.out.println("No");
        else if(!ss.substring(0,t/2).equals(ss.substring(t/2,t))){
        System.out.println("No");
        else
        System.out.println("Yes");
        }
        }

Compiler output:
Main.java:19: error: 'else' without 'if'
        else
        ^
Main.java:22: error: reached end of file while parsing
        }
         ^
2 errors