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

package aaaa;

import java.util.Scanner;

public class E {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    String S = sc.next();
    String ans = "No";
    
    if (N % 2 == 0) {
      String s1 = S.substring(0, N/2);
      String s2 = S.substring(N/2, N);
      if (s1.equals(s2))
        ans = "Yes";
    }
    
    System.out.print(ans);
  }
}

Compiler output:
Main.java:5: error: class E is public, should be declared in a file named E.java
public class E {
       ^
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 S = sc.nextLine();
    String ans = "No";
    
    if (N % 2 == 0) {
      String s1 = S.substring(0, N/2);
      String s2 = S.substring(N/2, S);
      if (s1 == s2)
        ans = "Yes";
    }
    
    System.out.print(ans);
  }
}

Compiler output:
Main.java:12: error: incompatible types: String cannot be converted to int
      String s2 = S.substring(N/2, S);
                                   ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
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 S = sc.nextLine();
    String ans = "No";
    
    if (S % 2 == 0) {
      String s1 = S.substring(0, S/2);
      String s2 = S.substring(S/2, S);
      if (s1 = s2)
        ans = "Yes";
    }
    
    System.out.print(ans);
  }
}

Compiler output:
Main.java:10: error: bad operand types for binary operator '%'
    if (S % 2 == 0) {
          ^
  first type:  String
  second type: int
Main.java:11: error: bad operand types for binary operator '/'
      String s1 = S.substring(0, S/2);
                                  ^
  first type:  String
  second type: int
Main.java:12: error: bad operand types for binary operator '/'
      String s2 = S.substring(S/2, S);
                               ^
  first type:  String
  second type: int
Main.java:13: error: incompatible types: String cannot be converted to boolean
      if (s1 = s2)
             ^
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using vs = vector<string>;
using in6 = int64_t;
using ind = double;
using pii = pair<int,int>;
using psi = pair<string,int>;
using vpi = vector<pii>;
using vps = vector<psi>;
#define rep(i, n) for (in6 i = 0; i < (in6)(n); i++)
#define repa(i,a,n) for(in6 i = a; i < (in6)(n); i++)
#define repdown(i,n) for(in6 i = n; i > 0; i--)
#define kyun ios::sync_with_stdio(false)
#define hinata cout << "\n"
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define inf 2147483647

int main() {
  kyun;
  int n;
  cin >> n;
  string s,a,b;
  cin >> s;
  a = substr(0,n/2);
  b = substr(n/2);
  if(a == b && n % 2 == 0) cout << "Yes";
  else cout << "No";
  hinata;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   27 |   a = substr(0,n/2);
      |       ^~~~~~
      |       strstr
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 S sc.next();
		int ans="Yes";
		if(N%2==1){
			ans="No";
			System.out.println(ans);
		}
		else{
			for(int i=0;i<=N/2-1;i++){
				if(S.charAt(i)!=S.charAt(i+(N/2))){
					ans="No";
				}
			}
		}
		System.out.println(ans);
    }
}

Compiler output:
Main.java:6: error: ';' expected
		String S sc.next();
		        ^
1 error
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  string ans="Yes";
  if(n%2==1) {
    ans="No";
    cout<<ans<<endl;
    return 0;
  }
 string a=s.sbstr(0,n/2);
 string b=s.sbstr(n/2);
  if(a!=b){
    ans="No";
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbstr'; did you mean 'substr'?
   17 |  string a=s.sbstr(0,n/2);
      |             ^~~~~
      |             substr
a.cc:18:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbstr'; did you mean 'substr'?
   18 |  string b=s.sbstr(n/2);
      |             ^~~~~
      |             substr
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  string ans="Yes";
  if(n%2==1) {
    ans="NO";
  }
  rep(i,n/2+1){
 if( s[i]!=s[n/2+1+i) {
   ans="No";
 }
             }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ']' before ')' token
   16 |  if( s[i]!=s[n/2+1+i) {
      |                     ^
      |                     ]
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  string ans="Yes";
  if(n%2==1) {
    ans="NO";
  }
  rep(i,n/2+1){
 if( s[i]!=s[n/2+1+i) {
   ans="No";
 }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ']' before ')' token
   16 |  if( s[i]!=s[n/2+1+i) {
      |                     ^
      |                     ]
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
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;}
  string a=s.substr(0.n/2);
  string b=s.substr(n/2);
  if(a==b) {
    cout << "Yes" << endl;}
  else {
    cout << "No" << endl;}
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: unable to find numeric literal operator 'operator""n'
    9 |   string a=s.substr(0.n/2);
      |                     ^~~
Language: C++

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

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

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N; 
  string S;
  cin>>N;
    cin>>S;
  bool te=false;
  string A=S.substr(0,N/2);
  string B=S.substr(N/2);
    if(A==B) te=ture;
  if (te) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}
                  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'ture' was not declared in this scope; did you mean 'te'?
   12 |     if(A==B) te=ture;
      |                 ^~~~
      |                 te
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N; 
  string S;
  cin>>N;
    cin>>S;
  bool te=false;
  string A=S.substr(0,N/2);
  string B=S.substr(N/2)
    if(A==B) te=ture;
  if(te) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}
                  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'if'
   12 |     if(A==B) te=ture;
      |     ^~
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

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

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

#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
 
void Main()
{
	int N;
    int count = 0;
    string S;
  
  	cin >> N >> S;
  
    if(N % 2 == 1){
      printf("No");
    }
  
    else{
      for(i = 0; i < N / 2; i++){
        
        if(S[i] == S[2/N+i])
          count++;
      }
      if(count == N/2){
        printf("Yes");
      }
    }
	
	
}
 
int main()
{
	std::cin.tie(nullptr);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}

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

#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
 
void Main()
{
	int N;
    string S;
  
  	cin >> N >> S;
  
    if(N % 2 == 1){
      printf("No");
    }
  
    else{
      for(i = 0; i < N / 2; i++){
        
        if(S[i] == S[2/N+i])
          count++;
      }
      if(count == N/2){
        printf("Yes");
      }
    }
	
	
}
 
int main()
{
	std::cin.tie(nullptr);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}

Compiler output:
a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
    2 | #include<boost/multi_array.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

public class Atcoder{
    public static void main(String[] args) {
        int N = new java.util.Scanner(System.in).nextInt();
        String S = new java.util.Scanner(System.in).nextLine();
        String T = S.substring(N/2);
        if(S.equals(T + T)){
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
}

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

public class Atcoder{
    public static void main(String[] args) {
        int N = new java.util.Scanner(System.in).nextInt();
        String S = new java.util.Scanner(System.in).nextLine();
        String T = S.substring(N/2);
            System.out.println(T);
        if(S.equals(T + T)){
            System.out.println("Yes");
        }
        else System.out.println("No");
        }
    }
}

Compiler output:
Main.java:13: error: class, interface, enum, or record expected
}
^
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 s = sc.next();
        String ss1 = s.substring(0,length()/2);
        String ss2 = s.substring(s.length()/2,s.length());
        System.out.println(ss1.equals(ss2)?"Yes":"No");
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        String ss1 = s.substring(0,length()/2);
                                   ^
  symbol:   method length()
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();
        int flag = 1;
        for(int i = 0; i < s.length()/2; i++){
            if(n%2 != 0){
                flag = 0;
                break;
            }
            if(s[i] != s[i+s.length()/2]){
                flag = 0;
                break;
            }
        }
        if(flag == 1){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:15: error: array required, but String found
            if(s[i] != s[i+s.length()/2]){
                ^
Main.java:15: error: array required, but String found
            if(s[i] != s[i+s.length()/2]){
                        ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();
        int flag = 1;
        for(int i = 0; i < s.length()/2; i++){
            if(n%2 != 0){
                flag = 0;
                break;
            }
            if(s[i] != s[i+s.length()/2]){
                flag = 0;
                break;
            }
        }
        if(flag == 1){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
}

Compiler output:
Main.java:25: error: reached end of file while parsing
}
 ^
1 error
Language: C++

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

int main() {
  int n,p;
  cin >> n;
  string s,v,ans;
  cin >> s;
  p = s.size;
  if(p%2 != 0){ans = "No";}
  v = s.substr(0,p/2);
  if(v + v == s){ans = "Yes";}
  else{ans = "No";}
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    9 |   p = s.size;
      |         ^~~~
Language: C++

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

int main() {
  int n,p;
  cin >> n;
  string s,v,ans;
  cin >> s;
  p = s.size;
  if(p%2 != 0){ans = "No"}
  v = s.substr(0,p/2);
  if(v + v = s){ans = "Yes"}
  else{ans = "No"}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    9 |   p = s.size;
      |         ^~~~
a.cc:10:26: error: expected ';' before '}' token
   10 |   if(p%2 != 0){ans = "No"}
      |                          ^
      |                          ;
a.cc:12:12: error: could not convert '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>](v).std::__cxx11::basic_string<char>::operator=(s)' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |   if(v + v = s){ans = "Yes"}
      |      ~~~~~~^~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:12:28: error: expected ';' before '}' token
   12 |   if(v + v = s){ans = "Yes"}
      |                            ^
      |                            ;
a.cc:13:18: error: expected ';' before '}' token
   13 |   else{ans = "No"}
      |                  ^
      |                  ;
Language: C++

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

int main()
{
 	int N;
  	char S[100];
	std::cin >> N;
  	std::cin >> S;
  
  	bool flag = true;
  	for (int i=0;i<N/2;N++) {
     	if (S[i] != S[i+N/2]) {
          flag = false; 
          break;
        }
    }
  
    if (flag)
    	std::cout << "Yes" << std::endl;
    else
       	std::out << "No" << std::endl;
  
 	return 0;
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: 'out' is not a member of 'std'; did you mean 'oct'?
   23 |         std::out << "No" << std::endl;
      |              ^~~
      |              oct
Language: C++

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

int main() {
	int n; cin >> n;
	string s; cin >> s;
  	cout << (s.substring(0,n/2) == s.substring(n/2,n) ? "Yes" : "No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
    7 |         cout << (s.substring(0,n/2) == s.substring(n/2,n) ? "Yes" : "No") << endl;
      |                    ^~~~~~~~~
      |                    substr
a.cc:7:42: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
    7 |         cout << (s.substring(0,n/2) == s.substring(n/2,n) ? "Yes" : "No") << endl;
      |                                          ^~~~~~~~~
      |                                          substr
Language: C++

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

int main() {
	int n; cin >> n;
	sting s; cin >> s;
  	cout << (s.substring(0,n/2) == s.substring(n/2,n) ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'sting' was not declared in this scope
    6 |         sting s; cin >> s;
      |         ^~~~~
a.cc:6:25: error: 's' was not declared in this scope
    6 |         sting s; cin >> s;
      |                         ^
Language: Java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input11 = sc.nextLine();
        String input2 = sc.nextLine();
        int input1 = Integer.parseInt(input11);

        String 前半 = input2.substring(0, input1/2-1);
        String 後半 = input2.substring(input1/2, input1-1);
        
        if (Integer.parseInt(input1) == input2.length() && 前半.equals(後半)) {
                System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

}


Compiler output:
Main.java:14: error: incompatible types: int cannot be converted to String
        if (Integer.parseInt(input1) == input2.length() && ??.equals(??)) {
                             ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include "stdafx.h" //プリインクルードされている場合はコメントアウト
#include <iostream>
#include <string>
#include <cstdlib> //func147bでインクルード
#include <vector>  //func146b
using namespace std;


void func145b()
{
    int n,m;
    string s,tmp;
    cin >> n >> s;
    tmp = "No";
    m = n / 2;
    if (n % 2 == 0) {
        if (s.substr(0, m) == s.substr(m, m)) {
            tmp = "Yes";
        }
    }
    cout << tmp << endl;

}

int main(){
  func145b();
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h" //プリインクルードされている場合はコメントアウト
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected '}' before 'else'
   10 |       else if(i==n/2-1){
      |       ^~~~
a.cc:9:23: note: to match this '{'
    9 |     if(s[i]==s[i+n/2]){
      |                       ^
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else{
      |     ^~~~
a.cc:17:7: error: break statement not within loop or switch
   17 |       break;
      |       ^~~~~
a.cc: At global scope:
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected declaration or statement at end of input
   14 |   }
      |   ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  std::string S;
  cin>>N;
  cin>>S;
  if(N%2!=0){
    cout<<"No"<<endl;
  }
  else{
	for(int i=0;i<S.size();i++){
      if(a[i]==a[(N/2)+i]){
        count++;
      }
    }
    if(count==N/2){
      cout<<"Yes";
    }
  }
    return 0;
}
  
    
        

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'a' was not declared in this scope
   13 |       if(a[i]==a[(N/2)+i]){
      |          ^
a.cc:14:9: error: 'count' was not declared in this scope
   14 |         count++;
      |         ^~~~~
a.cc:17:8: error: 'count' was not declared in this scope
   17 |     if(count==N/2){
      |        ^~~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
int n;
cin >> n;
char s[n];
cin >> s;
string ans = "Yes";
if(n=="Yes") {
  REP(i,n/2) {
    if(s[i]!=s[i+n/2]) ans = "No";
  }
} else {
  ans = "No";
}
cout << ans << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 | if(n=="Yes") {
      |    ~^~~~~~~
Language: C++

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

#define for0(i, n) for (ll i = 0; i < (ll)(n); ++i) // 0 based indexing
#define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i) // 1 based indexing
#define forc(i, l, r) for (ll i = (ll)(l); i <= (ll)(r); ++i) // closed interver from l to r r inclusive
#define forr0(i, n) for (ll i = (ll)(n) - 1; i >= 0; --i) // reverse 0 based.
#define forr1(i, n) for (ll i = (ll)(n); i >= 1; --i) // reverse 1 based

#define ff first
#define ss second
#define pb push_back

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	ll n;
	cin >> n;
	string s;
	cin >> s;
	bool check = true;
	for0(i,n/2){
		if(s[i] != s[i+n/2]){
			check = false;
		}
	}
	if(check == true){
		cout << "Yes"
	}
	else{
		cout << "No";
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:30: error: expected ';' before '}' token
   31 |                 cout << "Yes"
      |                              ^
      |                              ;
   32 |         }
      |         ~
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    char[] s = sc.next().toCharArray();
    int l = s.length;
    boolean bl = true;
    if(l % 2 == 0){
      for(int i = 0; i < l; i++){
        if(s[i] == s[l - 1 - i]){
          continue;
        }else{
          bl = false;
          break;
        }
      }
      if(bl){
        System.out.println("Yes");
      }else{
        System.our.println("No");
      }
    }
}
}

Compiler output:
Main.java:21: error: cannot find symbol
        System.our.println("No");
              ^
  symbol:   variable our
  location: class System
1 error
Language: C++

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

int main(){
  int n;
  cin >> n;
  if( n%2 == 1 )cout << "No" << endl;;
  else if( n%2 == 0 ){
    string ans;
    ans = "Yes";
    int h = n/2;
    vector<int>bef(h);
    vector<int>aft(h);
    rep(i,h) cin >> bef[i];
    rep(i,h) cin >> aft[i];
    rep(i,h){
      if( bef[i] != aft[i] ) ans = "No";
      break;
    }
    cout << ans << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else if( n%2 == 0 ){
      |   ^~~~
Language: C++

#include <vector>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)

int main() {
    int n;
    string s,ans="Yes";
	cin>>n>>s;
	if(n%2)ans="No";
	else{
	    int m=n/2;
	    rep(j,m){
	        if(s[j]!=s[j+m]){
	            ans="No";
	            break;
	        }
	    }
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string s,ans="Yes";
      |     ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <vector>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin>>n>>s;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <vector>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:17: error: 's' was not declared in this scope
    8 |         cin>>n>>s;
      |                 ^
a.cc:9:16: error: 'ans' was not declared in this scope
    9 |         if(n%2)ans="No";
      |                ^~~
a.cc:14:21: error: 'ans' was not declared in this scope
   14 |                     ans="No";
      |                     ^~~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<ans;
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:15: error: 'ans' was not declared in this scope
   19 |         cout<<ans;
      |               ^~~
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();
		System.out.println(S.substring(0,N/2), S.substring(N/2, N) ? "Yes" : "No");
	}
}


Compiler output:
Main.java:8: error: no suitable method found for println(String,S.substrin[...] "No")
		System.out.println(S.substring(0,N/2), S.substring(N/2, N) ? "Yes" : "No");
		          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
Main.java:8: error: incompatible types: String cannot be converted to boolean
		System.out.println(S.substring(0,N/2), S.substring(N/2, N) ? "Yes" : "No");
		                                                  ^
2 errors
Language: Java

import java.util.*;

class Main {
  Scanner in = new Scanner(System.in);
  int n = in.nextInt();
  String s = in.next();

  if (n % 2  == 1){
    System.out.println("No");
  }else{
    int mid = (int)n / 2;
    String s_1 = s.substring(0, mid);
    String s_2 = s.substring(mid);
    if (s_1.equals(s_2))
      System.out.println("Yes");
    else
      System.out.println("No");

  } 
}

Compiler output:
Main.java:8: error: illegal start of type
  if (n % 2  == 1){
  ^
Main.java:8: error: <identifier> expected
  if (n % 2  == 1){
       ^
Main.java:10: error: illegal start of type
  }else{
   ^
3 errors
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package test;
import java.util.*;
/**
 *
 * @author jackt
 */
public class Test {

    /**
     * @param args the command line arguments
     */

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


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

#include <iostream>
using namespace std;
 
int main() {
    int i;
    cin >> i;
    if(i % 2 == 0)
    {
      printf("No");
      return 0;
    }
    String s;
    cin >> s;
    int j = i/2;
    if(s.substr(0, j) == s.substr(j, j))
    {
      printf("Yes");
      return 0;
    };
    printf("No");
    return 0;
}

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

#include <iostream>
using namespace std;
 
string main() {
    int i;
    cin >> i;
    if(i % 2 == 0)
    {
        return "No";
    }
    string s;
    cin >> s;
    int j = i/2;
    if(s.substr(0, j) == s.substr(j, j))
    {
        return "Yes";      
    };
    return "No";
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | string main() {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    9 |         return "No";
      |                ^~~~
      |                |
      |                const char*
a.cc:16:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   16 |         return "Yes";
      |                ^~~~~
      |                |
      |                const char*
a.cc:18:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   18 |     return "No";
      |            ^~~~
      |            |
      |            const char*
Language: C++

#include <iostream>
using namespace std;

int main() {
    int i;
    cin >> i;
    if(i % 2 == 0)
    {
        return "No";
    }
    String s;
    cin >> s;
    int j = i/2;
    if(s.substr(0, j) == s.substr(j, j))
    {
        return "Yes";      
    };
    return "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    9 |         return "No";
      |                ^~~~
      |                |
      |                const char*
a.cc:11:5: error: 'String' was not declared in this scope
   11 |     String s;
      |     ^~~~~~
a.cc:12:12: error: 's' was not declared in this scope
   12 |     cin >> s;
      |            ^
a.cc:16:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   16 |         return "Yes";
      |                ^~~~~
      |                |
      |                const char*
a.cc:18:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   18 |     return "No";
      |            ^~~~
      |            |
      |            const char*
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'string'; did you mean 'stdin'?
    5 |   string s;
      |   ^~~~~~
      |   stdin
main.c:16:13: error: subscripted value is neither array nor pointer nor vector
   16 |         if(s[i] != s[(n/2) + i]){
      |             ^
main.c:16:21: error: subscripted value is neither array nor pointer nor vector
   16 |         if(s[i] != s[(n/2) + i]){
      |                     ^
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
#include <map>
#include <string.h>
#include <cstring>

using namespace std;

int main(){
    
    int n;
    cin >> n;
    char s[n];
    cin >> s;
    bool x=true;
    int num = strlen(s);
    char ans[n];
    if(num%2!=0){
        x=false;
    }
    else {
        for(int i=0;i<num/2;i++){
            ans[i]=s[i];
            ans[i+num/2]=s[i];
        }
    for(int j=0;j<num;j++){
        if(ans[j]==s[j]){
            continue;
            }
        else x=false;;
        }
        }
    if(x==true){
        cout << "Yes" << endl;
        }
    else cout << "No" << endl;
    return 0;
}

    if(x==true){
        cout << "Yes" << endl;
        }
    else cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc:51:5: error: expected unqualified-id before 'if'
   51 |     if(x==true){
      |     ^~
a.cc:54:5: error: expected unqualified-id before 'else'
   54 |     else cout << "No" << endl;
      |     ^~~~
a.cc:55:5: error: expected unqualified-id before 'return'
   55 |     return 0;
      |     ^~~~~~
a.cc:56:1: error: expected declaration before '}' token
   56 | }
      | ^
Language: C++

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

int main(int argc, char* argv[]){
	int n;
	string s;
	cin >> n >> s;
	bool ans = true;
	if(n%2 != 0) ans = false;
	else {
		string s1,s2;
		s1 = s.substr(0,n/2);
		s2 = s.substr(n/2,n/2+1);
		if (s1! != s2) ans = false;
	}
	cout << ( ans ? "Yes" : "No" ) << endl;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:14:23: error: expected ')' before '!' token
   14 |                 if (s1! != s2) ans = false;
      |                    ~  ^
      |                       )
a.cc:14:21: error: could not convert 's1' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   14 |                 if (s1! != s2) ans = false;
      |                     ^~
      |                     |
      |                     std::string {aka std::__cxx11::basic_string<char>}
Language: C

n=int(input())
s=input()
m=int(n/2)

if n%2==0 and s[:m]==s[m:]:
	print("Yes")
else:
	print("No")


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n=int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | n=int(input())
      |   ^~~
Language: Java

/* ABC145-B
   Takatan */

#include<stdio.h>
#include<stdlib.h>
int main(void){
    int length, i;
    char string[101];

    scanf( "%d" , &length);
    scanf( "%s" , string);

    for(i=0; i < length/2; i++){
        if(string[i]!=string[length/2+i] || length%2==1){
            printf( "No\n" );
            return 0;
        }
    }
    printf( "Yes\n" );
    return 0;
}

Compiler output:
Main.java:4: error: illegal character: '#'
#include<stdio.h>
^
Main.java:4: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:5: error: illegal character: '#'
#include<stdlib.h>
^
Main.java:8: error: class, interface, enum, or record expected
    char string[101];
    ^
Main.java:10: error: class, interface, enum, or record expected
    scanf( "%d" , &length);
    ^
Main.java:11: error: class, interface, enum, or record expected
    scanf( "%s" , string);
    ^
Main.java:13: error: class, interface, enum, or record expected
    for(i=0; i < length/2; i++){
    ^
Main.java:13: error: class, interface, enum, or record expected
    for(i=0; i < length/2; i++){
             ^
Main.java:13: error: class, interface, enum, or record expected
    for(i=0; i < length/2; i++){
                           ^
Main.java:16: error: class, interface, enum, or record expected
            return 0;
            ^
Main.java:17: error: class, interface, enum, or record expected
        }
        ^
Main.java:20: error: class, interface, enum, or record expected
    return 0;
    ^
Main.java:21: error: class, interface, enum, or record expected
}
^
13 errors
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 {
          for(int i=0; i<N/2; i++) {
              if(S.at(i)!=S.at(i+N/2) ) {
                  cout << "No" << endl;
                  break;
              }
          }
      }
      else
      cout << "Yes" << endl;
          
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected '(' before '{' token
   12 |       else if {
      |               ^
      |               (
a.cc:20:7: error: 'else' without a previous 'if'
   20 |       else
      |       ^~~~
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 {
          for(int i=0; i<N/2; i++){
              if(S.at(i)!=S.at(i+N/2)){
                  cout << "No" << endl;
                  break;
              }
          }
      }
      else
      cout << "Yes" << endl;
          
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: expected '(' before '{' token
   13 |       else if {
      |               ^
      |               (
a.cc:21:7: error: 'else' without a previous 'if'
   21 |       else
      |       ^~~~
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 {
          for(int i=0; i<N/2; i++){
              if(S.at(i)!=S.at(i+N/2)){
                  cout << "No" << endl;
                  break;
              }
          }
      else
      cout << "Yes" << endl;
          
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: lvalue required as left operand of assignment
   10 |        if(N%2=1)
      |           ~^~
a.cc:13:15: error: expected '(' before '{' token
   13 |       else if {
      |               ^
      |               (
a.cc:23:8: error: expected '}' at end of input
   23 |       }
      |        ^
a.cc:5:14: note: to match this '{'
    5 |   int main() {
      |              ^
Language: Java

import java.util.Scanner;

public class Question145 {
	public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Integer lenChara = Integer.valueOf(scan.nextLine());
        String targetChara = scan.nextLine();

        if (lenChara % 2 == 0) {
            int divide = lenChara / 2;
            String start = targetChara.substring(0, divide);
            String end = targetChara.substring(divide, targetChara.length());
            if (start.equals(end)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        Integer lenChara = Integer.valueOf(scan.nextLine());
        String targetChara = scan.nextLine();

        if (lenChara % 2 == 0) {
            int divide = lenChara / 2;
            String start = targetChara.substring(0, divide);
            String end = targetChara.substring(divide, targetChara.length());
            if (start.equals(end)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        } else {
            System.out.println("No");
        }
    }


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

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



int main() {
int N;
scanf("%d",&N);
char S[N];
scanf("%s",S);
char T1[N/2];
char T2[N/2];
for (int i=0;i<N/2;i++){
  T1[i]=S[i];
  T2[i]=S[(N/2)+i];
}
if (strcmp(T1,T2)==0) printf("Yes");
else printf("No");
return 0;

Compiler output:
main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
   22 | return 0;
      | ^~~~~~
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:7:16: error: 'r' undeclared (first use in this function)
    7 |   scanf("%d", &r);
      |                ^
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.Scanner;

public class MainEcho {

	public static void main(String[] args) {
		Scanner sc =  new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();

		int mojisuHalf = n/2;
		String mojiLeft = s.substring(0,mojisuHalf);
		String mojiRight = s.substring(mojisuHalf);

		if (mojiLeft.equals(mojiRight)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

}


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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define de cout<<"siktim seni\n";
ll int a,b,i,ans;
string b;
int main(){
	cin>>a>>b;
	if(a%2==1){cout<<"No";return 0;}
	for(i=a;i>=(a/2);--i){
		if(b[i]!=b[i-a/2]){cout<<"No";return 0;}
	}
	cout<<"Yes";
}

Compiler output:
a.cc:6:8: error: conflicting declaration 'std::string b'
    6 | string b;
      |        ^
a.cc:5:10: note: previous declaration as 'long long int b'
    5 | ll int a,b,i,ans;
      |          ^
a.cc: In function 'int main()':
a.cc:11:21: error: invalid types 'long long int[long long int]' for array subscript
   11 |                 if(b[i]!=b[i-a/2]){cout<<"No";return 0;}
      |                     ^
a.cc:11:27: error: invalid types 'long long int[long long int]' for array subscript
   11 |                 if(b[i]!=b[i-a/2]){cout<<"No";return 0;}
      |                           ^
Language: C++

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

int main(){
int r,z,k;
string s;
cin >> r;
cin >> s;
string ans = "Yes";
if(r%2==0){
  for(int i = 0;i<n/2;i++){
      if(s.at(i)!=s.at(i+(n/2))){
          ans = "No";
      }
  }
}else{
    ans = "No";
}
cout << ans << endl;
}

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

#include <stdio.h>

bool RS(char s[], int n)
{
	if (n % 2 == 1)
		return false;
	
	for (int i = 0; i < n/2; i++) {
		if (s[i] != s[i + n/2])
			return false;
	}
	
	return true;
}

void PutYN(bool b)
{
	if (b)
		puts("Yes");
	else
		puts("No");
}

int main()
{
	int n; char s[101];
	scanf("%d %s", &n, &s);
	
	PutYN(RS(s, n));
}


Compiler output:
main.c:3:1: error: unknown type name 'bool'
    3 | bool RS(char s[], int n)
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c: In function 'RS':
main.c:6:24: error: 'false' undeclared (first use in this function)
    6 |                 return false;
      |                        ^~~~~
main.c:6:24: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:16: error: 'true' undeclared (first use in this function)
   13 |         return true;
      |                ^~~~
main.c:13:16: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: At top level:
main.c:16:12: error: unknown type name 'bool'
   16 | void PutYN(bool b)
      |            ^~~~
main.c:16:12: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:29:9: error: implicit declaration of function 'PutYN' [-Wimplicit-function-declaration]
   29 |         PutYN(RS(s, n));
      |         ^~~~~
Language: Java

import java.util.Scanner;

class Main {

  static boolean RS(String S, int n) {
    if (n%2)
      return false;
    for(int i = 0; i < n/2; i++)
      if(S.charAt(i) != S.charAt(i+n/2))
        return false;
    return true;
  }
  
  static void PutYN(boolean b) {
    if(b)
      System.out.println("Yes");
    else
      System.out.println("No");
      
  }
  
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    
    int n = stdIn.nextInt();
    String S = stdIn.next();
    
    PutYN(RS(S, n)); 
  }
}


Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to boolean
    if (n%2)
         ^
1 error
Language: C++

#include<iostream>
using namespace std;

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

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

int main(){
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:9:21: error: expected ';' before 'i'
    9 |   for(int i=0; i<n/2 i++){
      |                     ^~
      |                     ;
a.cc:12:15: error: expected ';' before ':' token
   12 |       return 0:
      |               ^
      |               ;
a.cc:12:15: error: expected primary-expression before ':' token
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
char s[500];

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     cin>>n;
      |          ^
      |          yn
Language: C++

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

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

    if(N <= 1) {
        cout << "No" << endl;
        return 0;
    }

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

    if(flag != 0)
        cout << "No" << endl;
    else
        cout << "Yes" << endl;

}

Compiler output:
a.cc:21:5: error: expected unqualified-id before 'else'
   21 |     else
      |     ^~~~
a.cc:22:22: error: 'i' does not name a type
   22 |         for(int i=0; i<N/2; i++){
      |                      ^
a.cc:22:29: error: 'i' does not name a type
   22 |         for(int i=0; i<N/2; i++){
      |                             ^
a.cc:27:5: error: expected unqualified-id before 'if'
   27 |     if(flag != 0)
      |     ^~
a.cc:29:5: error: expected unqualified-id before 'else'
   29 |     else
      |     ^~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^