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

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string 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:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N >> S;
      |   ^~~
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:6:15: error: 'S' was not declared in this scope
    6 |   cin >> N >> S;
      |               ^
a.cc:9:7: error: 'cout' was not declared in this scope
    9 |       cout << "Yes" << endl;
      |       ^~~~
a.cc:9:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:24: error: 'endl' was not declared in this scope
    9 |       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:11:5: error: 'cout' was not declared in this scope
   11 |     cout << "No" << endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:21: error: 'endl' was not declared in this scope
   11 |     cout << "No" << endl;
      |                     ^~~~
a.cc:11:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "No" << endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |     cout << "No" << endl;
      |                     ^~~~
a.cc:14:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include <stdio.h>

int solve(int N, char s[]) {
    if (N & 1) return 0;
    for (int i = 0; i < N / 2; i++) {
        if (s[i] != s[i + N / 2]) {
            return 0;
        }
    }
    return 1;
}
 
int main() {
    int N;
    char s[101];
    scanf("%d%s", &N, s);
    if (solve(N, s)) printf("YES");
    else printf("NO")
}


Compiler output:
main.c: In function 'main':
main.c:18:22: error: expected ';' before '}' token
   18 |     else printf("NO")
      |                      ^
      |                      ;
   19 | }
      | ~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
    int i,j,l,n,k;
    scanf("%d", &n);
    char s[n],t[n];
    scanf("%s", s);
    if(n%2!=0)printf("No\n");
    else
    {
        for(i=0;i<n/2;i++)
        {
            t[i]=s[i];
        }
        t[i]='\0';
        if(strcmp(strcat(t,t),s)==0)printf("Yes\n");
        else printf("No\n");111
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:32: error: expected ';' before '}' token
   18 |         else printf("No\n");111
      |                                ^
      |                                ;
   19 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>


using namespace std;

int main(){
   int k;
   cin>>k;
   int flag=1;
  string S;
  getline(cin, S); 
  int n=S.length();
if((n%2)!=0){
    cout<<"No";
}else if(n%2==0){

  for(int i=0;i<n/2;i++){
    if(S[i]!=S[(n/2)+i]){
        cout<<"No";
        flag=0;
        break;
    }
  }
  if(flag==1){
      cout<<"Yes";
  }
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'substr' in 's', which is of non-class type 'int'
    7 |    if(s.substr(0,(n/2)-1) == s.substr(n/2,n-1)) {
      |         ^~~~~~
a.cc:7:32: error: request for member 'substr' in 's', which is of non-class type 'int'
    7 |    if(s.substr(0,(n/2)-1) == s.substr(n/2,n-1)) {
      |                                ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  int s;
  cin >> n >> s;
   if(s.substr(0,(n/2)-1) == s.substr(n/2,n-1)) {
    cout << 'Yes' << endl;
  }
  else {
    cout << 'No' << endl;
  }
  return 0;
}

Compiler output:
a.cc:8:13: warning: multi-character character constant [-Wmultichar]
    8 |     cout << 'Yes' << endl;
      |             ^~~~~
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |     cout << 'No' << endl;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'substr' in 's', which is of non-class type 'int'
    7 |    if(s.substr(0,(n/2)-1) == s.substr(n/2,n-1)) {
      |         ^~~~~~
a.cc:7:32: error: request for member 'substr' in 's', which is of non-class type 'int'
    7 |    if(s.substr(0,(n/2)-1) == s.substr(n/2,n-1)) {
      |                                ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  int s;
  cin >> n >> s;
   if(sub.str(0,(n/2)-1) == sub.str(n/2,n-1)) {
    cout << 'Yes' << endl;
  }
  else {
    cout << 'No' << endl;
  }
  return 0;
}

Compiler output:
a.cc:8:13: warning: multi-character character constant [-Wmultichar]
    8 |     cout << 'Yes' << endl;
      |             ^~~~~
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |     cout << 'No' << endl;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:7:7: error: 'sub' was not declared in this scope; did you mean 'fsub'?
    7 |    if(sub.str(0,(n/2)-1) == sub.str(n/2,n-1)) {
      |       ^~~
      |       fsub
Language: C++

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define ll long long
using namespace std;



int main(){

    int n;
    string s;

    if(n % 2 == 1){
        puts("No\n");
    }else {

        int a = s.substr(0,n / 2);
        int b = s.substr(n / 2,n);

        if(a == b){
            puts("Yes\n");
        }else{
            puts("No\n");
        }
    }
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in initialization
   41 |         int a = s.substr(0,n / 2);
      |                 ~~~~~~~~^~~~~~~~~
      |                         |
      |                         std::__cxx11::basic_string<char>
a.cc:42:25: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in initialization
   42 |         int b = s.substr(n / 2,n);
      |                 ~~~~~~~~^~~~~~~~~
      |                         |
      |                         std::__cxx11::basic_string<char>
Language: C++

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define ll long long
using namespace std;



int main(){

    int n;
    string s;

    if(n % 2 == 1){
        puts("No\n");
    }else {

        int a = substr(0,n / 2);
        int b = substr(n / 2,n);

        if(a == b){
            puts("Yes\n");
        }else{
            puts("No\n");
        }
    }
    return 0;
}



 

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

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

int main() {

    int n;
    string s;

    cin >> n >> s;

    if(n%2 == 1){

        cout << "No" <<endl;
    }

    string a == s.substr(0,s/2)
    string b == s.substr(s/2)

    if(a == b){
        cout << "Yes" <<endl;
    }else {
        cout << "no" <<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: expected initializer before '==' token
   18 |     string a == s.substr(0,s/2)
      |              ^~
a.cc:23:6: error: 'else' without a previous 'if'
   23 |     }else {
      |      ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n,mid=0,i=0,j,k;
	
	cin>>n;
	char a[n],b[n],c[n];
	mid=n/2;
	for(i=0;i<n;i++){
		cin>>a[i];
	}
	for(j=0;j<=mid-1;j++){
		b[j]=a[j];
		
	}
    for(k=mid,i=0;k<n;k++){
		c[i]=a[k];
		i++;
	}
	if(strcmp(b,c)==0){
		cout<<"Yes";
	}
	else
	{cout<<"No";}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: 'strcmp' was not declared in this scope
   21 |         if(strcmp(b,c)==0){
      |            ^~~~~~
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 | using namespace std;
Language: C++

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

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

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

int N,S[100];
int flag=1;
int j=N/2;

for(int i=0;i<N;i++){
if(S[i]!=S[j] || j<=i)
{
	flag=0;
break;

}j++;

}
if (flag==0)
cout<<"No";
else
cout<<"Yes";
return 0;
}

Compiler output:
a.cc:5:1: error: expected unqualified-id before 'for'
    5 | for(int i=0;i<N;i++){
      | ^~~
a.cc:5:13: error: 'i' does not name a type
    5 | for(int i=0;i<N;i++){
      |             ^
a.cc:5:17: error: 'i' does not name a type
    5 | for(int i=0;i<N;i++){
      |                 ^
a.cc:14:1: error: expected unqualified-id before 'if'
   14 | if (flag==0)
      | ^~
a.cc:16:1: error: expected unqualified-id before 'else'
   16 | else
      | ^~~~
a.cc:18:1: error: expected unqualified-id before 'return'
   18 | return 0;
      | ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>
#include<unordered_map>
using namespace std;
bool concat(char* a,int n){
unordered_map<int,int>t;
for(int i=0;i<n;i++){
if(t.count(a[i])>0){
t[a[i]]++;
}
else
t[a[i]]=1;
}
if(t.size()%2==0)
return true;
else
return false;
}
int main(){
int n;
char* a[100];
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
bool s=concat(a,n);
if(s){
cout<<"Yes";
}
else{
cout<<"No";
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: cannot convert 'char**' to 'char*'
   25 | bool s=concat(a,n);
      |               ^
      |               |
      |               char**
a.cc:4:19: note:   initializing argument 1 of 'bool concat(char*, int)'
    4 | bool concat(char* a,int n){
      |             ~~~~~~^
Language: C++

#include<bits/stdc++.h>
int main()
{
int n,i;
cin>>n;
char ch[n],ch2[n];
cin>>ch;
for(i=0;i<n/2;i++)
{
ch2[i] = ch[i];
}
if(strcmp(ch,ch2) == 0)
cout<<"Yes";
else
cout<<"No";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin>>n;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout<<"Yes";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 | cout<<"No";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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


Compiler output:
a.cc:29:1: error: expected unqualified-id before 'if'
   29 | if(n%2!=0)
      | ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i;
cin>>n;
char ch[n],ch2[n];
gets(ch);
for(i=0;i<n/2;i++)
{
ch2[i] = ch[i];
}
if(strcmp(ch,ch2) == 0)
cout<<"Yes";
else
cout<<"No";
return 0;
}

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

#include<bits/stdc++.h>
using namespance std;
int main()
{
int n,i;
cin>>n;
char ch[n],ch2[n];
gets(ch);
for(i=0;i<n/2;i++)
{
ch2[i] = ch[i];
}
if(strcmp(ch,ch2) == 0)
cout<<"Yes";
else
cout<<"No";
return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespance'
    2 | using namespance std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin>>n;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 | gets(ch);
      | ^~~~
      | getw
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 | cout<<"Yes";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 | cout<<"No";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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


Compiler output:
a.cc:29:1: error: expected unqualified-id before 'else'
   29 | else
      | ^~~~
Language: C++

#include<bits/stdc++.h>
int main()
{
int n,i;
cin>>n;
char ch[n],ch2[n];
gets(ch);
for(i=0;i<n/2;i++)
{
ch2[i] = ch[i];
}
if(strcmp(ch,ch2) == 0)
cout<<"Yes";
else
cout<<"No";
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin>>n;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 | gets(ch);
      | ^~~~
      | getw
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout<<"Yes";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 | cout<<"No";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     {if(a[i]!=a[n-1-i])
      |         ^
a.cc: At global scope:
a.cc:29:1: error: expected unqualified-id before 'else'
   29 | else
      | ^~~~
Language: C++

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

Compiler output:
a.cc:27:11: warning: missing terminating " character
   27 |     cout<<"No;
      |           ^
a.cc:27:11: error: missing terminating " character
   27 |     cout<<"No;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     {if(a[i]!=a[n-1-i])
      |         ^
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
a.cc: At global scope:
a.cc:29:1: error: expected unqualified-id before 'else'
   29 | else
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
#define df 0
#define rep(i,n) for(int i=0;i<(n);i++)
#define repa(i,a,n) for(int i=(a);i<(n);i++)
typedef long int li;

int main(){
  if(df) printf("*debug mode*\n");
  int n,f=1; cin >>n;
  string s; cin >>s;
  if(n%2){
    cout << "No";
    return 0;
  }
  n/=2;
  rep(i,n){
    if(s.at(i)!=s.at(i+n)){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes"
}

/// confirm df==0 ///

Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: expected ';' before '}' token
   23 |   cout << "Yes"
      |                ^
      |                ;
   24 | }
      | ~
Language: C++

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


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>;
      |                    ^
a.cc: In function 'int main()':
a.cc:7:36: error: expected primary-expression before ')' token
    7 |     for (int i = 0; i < n / 2; i+++) w &= s[i] == s[i + n / 2];
      |                                    ^
Language: C++

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


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <iostream>;
      |                    ^
a.cc: In function 'int main()':
a.cc:7:36: error: expected primary-expression before ')' token
    7 |     for (int i = 0; i < n / 2; i+++) w &= s[i] == s[i + n / 2];
      |                                    ^
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #<
    1 | #<include> iostream;
      |  ^
a.cc: In function 'int main()':
a.cc:4:16: 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 | #<include> iostream;
a.cc:5:9: 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 | #<include> iostream;
a.cc:5:26: error: 's' was not declared in this scope
    5 |         string s; cin >> s;
      |                          ^
a.cc:7:36: error: expected primary-expression before ')' token
    7 |     for (int i = 0; i < n / 2; i+++) w &= s[i] == s[i + n / 2];
      |                                    ^
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << (w ? "Yes" : "No") << endl;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:39: error: 'endl' was not declared in this scope
    8 |         cout << (w ? "Yes" : "No") << endl;
      |                                       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #<include> iostream;
Language: C++

#include <bits/stdc++.h>


using namespace std;



int main()
{



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

cout << "Yes";


}























Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before '{' token
   16 | int (n%2==1){ cout << "No"; return 0;}
      |             ^
      |             ;
Language: C++

#include<iostream>
using namespace std;

int main()
{
long long int n;
cin>>n;
string s;
cin>>s;
int x=n/2;

for(int i=0;i<x;i++)
{
if(s[i]==s[i+x])
{
count=1;
}
else{
cout<<"NO"<<endl;
break;
}
}
if(count==1)
{
cout<<"YES"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:1: error: 'count' was not declared in this scope
   16 | count=1;
      | ^~~~~
a.cc:23:4: error: 'count' was not declared in this scope
   23 | if(count==1)
      |    ^~~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'i' was not declared in this scope
   12 |         s2 += s[i];
      |                 ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
 	string s, s1, s2;
  	cin >> s;
  	int n = s.size();
  	for (int i = 0; i < n / 2; i++) {
    	s1 += s[i];
    }
  	for (int j = n / 2; j < n; j++) {
    	s2 += s[i];
    }
  	if (s1 == s2) {
    	cout << "Yes" << endl;
    }
  else {cout << "No" << endl; }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'i' was not declared in this scope
   12 |         s2 += s[i];
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:47: error: expected ';' before 'cout'
    8 |   if(s.substr(0,x/2)==s.substr(x/2+1,s.size())
      |                                               ^
      |                                               ;
    9 |       cout<<"Yes";
      |       ~~~~                                     
a.cc:8:21: warning: ignoring return value of 'bool 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>]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |   if(s.substr(0,x/2)==s.substr(x/2+1,s.size())
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3755:5: note: declared here
 3755 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:10:3: error: expected primary-expression before 'else'
   10 |   else
      |   ^~~~
a.cc:9:19: error: expected ')' before 'else'
    9 |       cout<<"Yes";
      |                   ^
      |                   )
   10 |   else
      |   ~~~~             
a.cc:8:5: note: to match this '('
    8 |   if(s.substr(0,x/2)==s.substr(x/2+1,s.size())
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n,k,x=0;
  string s="";
  cin >> n >> s;
  if(n%2 == 0)
  {
    k = n/2;
    for(int t =0;t<k;t++)
    {
       if(s[t] == s[k+t]{++x;}
      
    }
    if(x==k-1){cout << "YES" << endl;}
    else{cout << "NO" <<endl;}
   }
  else{cout << "NO"<<endl;}
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: expected ')' before '{' token
   13 |        if(s[t] == s[k+t]{++x;}
      |          ~              ^
      |                         )
a.cc:15:5: error: expected primary-expression before '}' token
   15 |     }
      |     ^
Language: C++

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

int main() {
  int n;
  string s;
  cin >> n >> s;
  if(n%2 == 1){
    cout << "No" << endl;
  }else{
    if(s.erase(4)==s.substr(4)){
      cout << "Yes" << endl;
    }else{
      vout << "No" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'vout' was not declared in this scope
   14 |       vout << "No" << endl;
      |       ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
	int n;
	cin >> n;
	string s;
	cin >> s;
	if(n%2!=0) { cout << "No\n"; return 0; }
	string s2,s3;
	s2=s.substr(0,n/2);
	s3=s.substr(n/2,n/2);
	cout << s2 
	if(s2==s3) cout << "Yes\n";
	else cout << "No\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before 'if'
   14 |         cout << s2
      |                   ^
      |                   ;
   15 |         if(s2==s3) cout << "Yes\n";
      |         ~~         
a.cc:16:9: error: 'else' without a previous 'if'
   16 |         else cout << "No\n";
      |         ^~~~
Language: C

#include <stdio.h>
int main(){
	int n;
  	scanf("%d" , &n);	
  	char a[n];
  	scanf("%s" , a);
  	int i = 0;	
  	for( i = 0 ; i < n/2 ; i++){
    	if(a[i] != a[n/2 + i]{
        	printf("No");
          	return 0;
    	}
    }
    printf("Yes");
          	       
}

Compiler output:
main.c: In function 'main':
main.c:9:30: error: expected ')' before '{' token
    9 |         if(a[i] != a[n/2 + i]{
      |           ~                  ^
      |                              )
main.c:13:5: error: expected expression before '}' token
   13 |     }
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string a1,a2,a3;
  int b;
  cin>>b;
  cin>>a;
  for(int i=0;i<b/2;i++){
    a2=a1[i]+a2;
    a3=a1[b/2+i]+a3;
  }
  if(a2==a3){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'a' was not declared in this scope
    7 |   cin>>a;
      |        ^
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();

    int a = N%2;    

    if(a == 0){
      for(int i=0; i<N/2; i++){
         if(S.charAt(i) == S.charAt(i+N/2)){

           System.out.println("Yes");

         } else{

           System.out.println("No");

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

Compiler output:
Main.java:24: error: 'else' without 'if'
      }else{
       ^
1 error
Language: C++

#include<bits/stdc++.h>
#include<string >
using namespace std;
int main(){
	int N;
	cin>>N;
	char S[N+1];
	cin>>S;
    
	int count=0;
	
	if(N%2==0){

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



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

#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main(void){
  int N;
  cin >> N;
  string S;
  cin >> S;
  int i;
  boolean flug = true;
  if(N%2 == 1) cout << "No" << endl;
  else {
   for(i=0;i<N/2;i++){
     if(S[i] != S[i+N/2]) flug = false;
   }
    if(flug == true) cout << "Yes" << endl;
    else cout << "No" << endl;
    
  }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   11 |   boolean flug = true;
      |   ^~~~~~~
      |   bool
a.cc:15:27: error: 'flug' was not declared in this scope
   15 |      if(S[i] != S[i+N/2]) flug = false;
      |                           ^~~~
a.cc:17:8: error: 'flug' was not declared in this scope
   17 |     if(flug == true) cout << "Yes" << endl;
      |        ^~~~
Language: C++

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

int main() {

    int n;
    string s;

    cin >> n >> s;

    if(n%2 == 1){

        cout << "No" <<endl;
    }

    string a == s.substr(0,s/2)
    string b == s.substr(s/2)

    if(a = b){
        cout << "Yes" <<endl;
    }else {
        cout << "no" <<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: expected initializer before '==' token
   18 |     string a == s.substr(0,s/2)
      |              ^~
a.cc:23:6: error: 'else' without a previous 'if'
   23 |     }else {
      |      ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,i=0;
    cin>>n;
    string s;
    cin>>s;
    int cnt=0,l=n/2;
    if(n%2)
    {
        cout<<"NO"<<"\n";
        return 0;
    }
    for(int i=0;i<n/2;i++,l++)
    {
        if(s[i]==s[l])
            cnt+=2;
         
    }
    if(cnt==n)
    
            cout<<"YES"<<"\n;
    else
            cout<<"NO"<<"\n;
        
    
    return 0;
    
}

Compiler output:
a.cc:23:26: warning: missing terminating " character
   23 |             cout<<"YES"<<"\n;
      |                          ^
a.cc:23:26: error: missing terminating " character
   23 |             cout<<"YES"<<"\n;
      |                          ^~~~
a.cc:25:25: warning: missing terminating " character
   25 |             cout<<"NO"<<"\n;
      |                         ^
a.cc:25:25: error: missing terminating " character
   25 |             cout<<"NO"<<"\n;
      |                         ^~~~
a.cc: In function 'int main()':
a.cc:24:5: error: expected primary-expression before 'else'
   24 |     else
      |     ^~~~
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N	 = scan.nextInt();
		String S = scan.next();
		String front	= S.substring(0, S.length()/2 - 1);
		String behind	= S.substring(S.length()/2, S.length());

		if (N % 2 == 1) {
			System.out.println("No");
		} else if (front.equals(behind)) {
			System.out.println("Yes");
		}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    sc.nextLine();
    String s=sc.nextLine();
    if(n%2!=0)
      System.out.println("No");
    else
    {
      boolean b=true;
      for(int i=n/2-1;j=n-1;i<n/2;i--,j--)
      {
        if(s.charAt(i)!=s.charAt(j))
        {
          b=false;
          break;
        }
      }
      if(b)
        System.out.println("Yes");
      else
        System.out.println("No");
    }
  }
}

Compiler output:
Main.java:15: error: not a statement
      for(int i=n/2-1;j=n-1;i<n/2;i--,j--)
                             ^
Main.java:15: error: ')' expected
      for(int i=n/2-1;j=n-1;i<n/2;i--,j--)
                                 ^
Main.java:15: error: ';' expected
      for(int i=n/2-1;j=n-1;i<n/2;i--,j--)
                                     ^
Main.java:15: error: ';' expected
      for(int i=n/2-1;j=n-1;i<n/2;i--,j--)
                                         ^
4 errors
Language: C++

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

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


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

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <stack>
#include <cmath>
#include <time.h>
#include <unordered_set>
#include <unordered_map>

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define INF (ll)1e18
#define MOD (ll)1e9 + 7
#define pb push_back

typedef long long ll;
typedef long long int llt;
typedef pair<int, int> P;
typedef vector<int> V;
typedef map<int, int> M;

char dif = 'A' - 'a';
int mod = 1e9 + 7;
ll inf = 1e18;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int i, j;
	scanf("%d%s", &N, str);
	for (i = 0; i < N / 2; ++i) {
		if (str[i] != str[i + N / 2]) break;
	}
	if (N %2 == 1 || i != N / 2) printf("No");
	else printf("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:24: error: 'N' was not declared in this scope
   41 |         scanf("%d%s", &N, str);
      |                        ^
a.cc:41:27: error: 'str' was not declared in this scope; did you mean 'std'?
   41 |         scanf("%d%s", &N, str);
      |                           ^~~
      |                           std
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cassert>
#include <cstring>
#include <climits>

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define INF (ll)1e18
#define MOD (ll)1e9 + 7
#define pb push_back

typedef long long ll;
typedef long long int llt;
typedef pair<int, int> P;
typedef vector<int> V;
typedef map<int, int> M;

char dif = 'A' - 'a';
int mod = 1e9 + 7;
ll inf = 1e18;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int i, j;
	scanf("%d%s", &N, str);
	for (i = 0; i < N / 2; ++i) {
		if (str[i] != str[i + N / 2]) break;
	}
	if (N %2 == 1 || i != N / 2) printf("No");
	else printf("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: 'N' was not declared in this scope
   42 |         scanf("%d%s", &N, str);
      |                        ^
a.cc:42:27: error: 'str' was not declared in this scope; did you mean 'std'?
   42 |         scanf("%d%s", &N, str);
      |                           ^~~
      |                           std
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cassert>
#include <cstring>
#include <climits>

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define INF (ll)1e18
#define MOD (ll)1e9 + 7
#define pb push_back

typedef long long ll;
typedef long long int llt;
typedef pair<int, int> P;
typedef vector<int> V;
typedef map<int, int> M;

char dif = 'A' - 'a';
int mod = 1e9 + 7;
ll inf = 1e18;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int i, j;
	scanf("%d%s", &N, str);
	for (i = 0; i < N / 2; ++i) {
		if (str[i] != str[i + N / 2]) break;
	}
	if (N %2 == 1 || i != N / 2) printf("No");
	else printf("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:24: error: 'N' was not declared in this scope
   41 |         scanf("%d%s", &N, str);
      |                        ^
a.cc:41:27: error: 'str' was not declared in this scope; did you mean 'std'?
   41 |         scanf("%d%s", &N, str);
      |                           ^~~
      |                           std
Language: Java

import java.util.*;
public class Main{
  public static void main(String args[]){
  Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  String str = sc.next();
  if(n%2=1){
    System.out.println("No");
    System.exit(0);
  }else{}
  String str1 = str.substring(1,n/2);
  String str2 = str.substring((n/2)+1,n);
  if(str1.equals(str2)){
    System.out.println("Yes");
  }else{
    System.out.println("No");
  }


}
}

Compiler output:
Main.java:7: error: unexpected type
  if(n%2=1){
      ^
  required: variable
  found:    value
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String args[]){
  Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  String str = sc.next();
  String str1 = str.subString(0,n/2);
  String str2 = str.subString((n/2)+1,n);
  if(str1.equals(str2)){
    System.out.println("Yes");
  }else{
    System.out.println("No");
  }


}
}

Compiler output:
Main.java:7: error: cannot find symbol
  String str1 = str.subString(0,n/2);
                   ^
  symbol:   method subString(int,int)
  location: variable str of type String
Main.java:8: error: cannot find symbol
  String str2 = str.subString((n/2)+1,n);
                   ^
  symbol:   method subString(int,int)
  location: variable str of type String
2 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String args[]){
  Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  String str = sc.next();
  String str1 = str.subString(0,n/2);
  String str2 = str.subString((n/2)+1,n);
  if(str1.equal(str2)){
    System.out.println("Yes");
  }else{
    System.out.println("No");
  }


}
}

Compiler output:
Main.java:7: error: cannot find symbol
  String str1 = str.subString(0,n/2);
                   ^
  symbol:   method subString(int,int)
  location: variable str of type String
Main.java:8: error: cannot find symbol
  String str2 = str.subString((n/2)+1,n);
                   ^
  symbol:   method subString(int,int)
  location: variable str of type String
Main.java:9: error: cannot find symbol
  if(str1.equal(str2)){
         ^
  symbol:   method equal(String)
  location: variable str1 of type String
3 errors
Language: C++

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

int main()
{
  strimg s;
  cin>>s;
  int len=s.length();
  int flag=1;
  for(int i=0;i<len/2;i++)
  {
    if(s[i]!=s[(len/2)+i])
    {
      flag=0;
      break;
    }
  }
  if(flag==1)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std; 
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define dg1(x) debug() << pp(x)
#define dg2(x,y) debug() << pp(x) pp(y)
#define dg3(x,y,z) debug() << pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << pp(w) pp(x) pp(y) pp(z)
#define msg(x) debug() << x
#define int long long
const int xx = 2e5;
const int mod = 1e9 + 7;
signed main(){
  ios::sync_with_stdio(false);cin.tie(0);

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

  if(n%2){
    cout <<"No" << '\n';
    return 0;
  }
  srting x = "";
  for(int i=0;i<n/2;i++){
    x += s[i];
  }
  x = x + x;
  if(x == s){
    cout <<"Yes" << '\n';
  }
  else cout <<"No" << '\n';

}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:3: error: 'srting' was not declared in this scope
   51 |   srting x = "";
      |   ^~~~~~
a.cc:53:5: error: 'x' was not declared in this scope
   53 |     x += s[i];
      |     ^
a.cc:55:3: error: 'x' was not declared in this scope
   55 |   x = x + x;
      |   ^
Language: C++

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

int main() {
  int N , A ;
  string S ;
  cin >> N ;
  cin >> S ;
  if( N =1)
    cout << "No"
  A = (N+1)/2 ;
    for (int i=0; i<S.size()/2;i++){
      if (!(S.at(i) == S.at(N-A+i))){
        cout << "No" ;
        break ;
      }
      if (i ==S.size()/2-1)
        cout << "Yes";
    }
      
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ';' before 'A'
   10 |     cout << "No"
      |                 ^
      |                 ;
   11 |   A = (N+1)/2 ;
      |   ~
Language: C

#include<stdio.h>

int main(){
  int n,i,m;
  scanf("%d",&n);
  char s[n];
  if(n%2!=0)printf("No");
  for(m=0;m<n;m++){
    scanf("%s",s[m]);
   }
  else 
    {
    for(i=0;i=<n/2-1;i++)
      {
        if(s[i]==s[i+n/2])break;
      }
    if(s[i]==s[i+n/2]) printf("Yes")
      
      return 0;
   }

Compiler output:
main.c: In function 'main':
main.c:11:3: error: 'else' without a previous 'if'
   11 |   else
      |   ^~~~
main.c:13:15: error: expected expression before '<' token
   13 |     for(i=0;i=<n/2-1;i++)
      |               ^
main.c:17:37: error: expected ';' before 'return'
   17 |     if(s[i]==s[i+n/2]) printf("Yes")
      |                                     ^
      |                                     ;
   18 | 
   19 |       return 0;
      |       ~~~~~~                         
main.c:20:4: error: expected declaration or statement at end of input
   20 |    }
      |    ^
Language: C++

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

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

#include <stdio.h>
int main(void)
{
  int N,i;
  char C[N];
  scanf("%d",N);
  scanf("%c",C);
 
    if(N%2==1)
    {
        printf("No\n");
      }
    for(i=0;i<(N/2);i++)
    {
      if(C[i]=!C[N/2+i])
      {
        printf("No\n");
      }
      printf("Yes\n")
        return(0);
}


Compiler output:
main.c: In function 'main':
main.c:19:22: error: expected ';' before 'return'
   19 |       printf("Yes\n")
      |                      ^
      |                      ;
   20 |         return(0);
      |         ~~~~~~        
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^