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

import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   char[] c = sc.next().toCharArray();
   boolean b = true;
   boolean dame = false;
   int ans ;
   for(int i = 2;i<N;i+=2)
   {
     dame = false;
     for(int k = 0;k<(N-i)/2;k++)
     {
       if(c[k]!=c[k+(N-i)/2])
       {
         dame=true;
         break;
       }
     }
     if(!dame) ans = N-i;
   }
   System.out.println(ans);
 }
}

Compiler output:
Main.java:9: error: cannot find symbol
   for(int i = 2;i<N;i+=2)
                   ^
  symbol:   variable N
  location: class Main
Main.java:12: error: cannot find symbol
     for(int k = 0;k<(N-i)/2;k++)
                      ^
  symbol:   variable N
  location: class Main
Main.java:14: error: cannot find symbol
       if(c[k]!=c[k+(N-i)/2])
                     ^
  symbol:   variable N
  location: class Main
Main.java:20: error: cannot find symbol
     if(!dame) ans = N-i;
                     ^
  symbol:   variable N
  location: class Main
4 errors
Language: C++

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

int main()
{
    string s;
    cin>>s;
    int frr[28]={0};
    int arr[28]={0};
    for(int i=0;i<s.size();i++)
    {
        frr[s[i]-'a']++;
    }
    for(int i=s.size()-1;i>=0;i--)
    {
        frr[s[i]-'a']--;
        arr[s[i]-'a']++;
        int counter=0;
        for(int i=0;i<28;i++)
        {
            if(frr[i]%2==1)
            {
                counter++;
                break;
            }
        }
        if(counter==0&&i%2==0)
        {
            int flag=0;
            for(int i=0;i<28;i++)
            {
                if(arr[i]%2==1)
                {
                    flag++;
                    break;
                }
            }
            if(flag==0)
            {
                cout<<max(i,s.size()-i)<<endl;
                return 0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:26: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)'
   40 |                 cout<<max(i,s.size()-i)<<endl;
      |                       ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:40:26: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   40 |                 cout<<max(i,s.size()-i)<<endl;
      |                       ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:40:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   40 |                 cout<<max(i,s.size()-i)<<endl;
      |                       ~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
signed main(){
  string a,b,c;
  int b;
  cin>>a;
  for(int i=0;i<a.size();i++){
    if((a.size()-i)%2==0){
      for(int j=0;j<(a.size()-i)/2;j++){
        b+=a[j];
      }
      for(int j=(a.size()-i)/2;j<a.size()-i;j++){
        c+=a[j];
      }
      if(b==c){
        d=b.size();
        break;
      } 
      string b,c;
    }
  }
  cout<<d<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: conflicting declaration 'int b'
    5 |   int b;
      |       ^
a.cc:4:12: note: previous declaration as 'std::string b'
    4 |   string a,b,c;
      |            ^
a.cc:16:9: error: 'd' was not declared in this scope
   16 |         d=b.size();
      |         ^
a.cc:22:9: error: 'd' was not declared in this scope
   22 |   cout<<d<<"\n";
      |         ^
Language: Java

import org.assertj.core.util.Strings;

import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        System.out.println(execute(sc.nextLine()));

    }

    public static int execute(String base) {

        EvenString evenString = new EvenString(base);
        do{
            evenString.cut();
        }while (!evenString.isEvenString());

        return evenString.length();
    }

    public static List<String> splitByLength(String s, int length) {
        List<String> list = new ArrayList<>();
        if (!Strings.isNullOrEmpty(s)) {
            Matcher m = Pattern.compile("[\\s\\S]{1," + length + "}").matcher(s);
            while (m.find()) {
                list.add(m.group());
            }
        }
        return list;
    }

    private static class EvenString {
        String base;
        String first;
        String second;
        public EvenString(String base){
            this.split(base);
        }

        private void split(String base){
            this.base = base;
            int length = base.length() / 2;
            List<String> separated = splitByLength(base,length);
            this.first = separated.get(0);
            this.second = separated.get(1);
        }

        public boolean isEvenString(){
            return first.equals(second);
        }

        public int length(){
            return base.length();
        }

        public void cut() {
            String newBase = base.substring(0,base.length()-2);
            this.split(newBase);
        }
    }
}


Compiler output:
Main.java:1: error: package org.assertj.core.util does not exist
import org.assertj.core.util.Strings;
                            ^
Main.java:28: error: cannot find symbol
        if (!Strings.isNullOrEmpty(s)) {
             ^
  symbol:   variable Strings
  location: class Main
2 errors
Language: C++

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

 int main () {
char str [222];
  scanf ("%s", str ) ;
 int n= strlen (str ) ;
 for (int i=n -2; i; i -=2) {
 if( strncmp (str , str +i/2 , i/2) ==0) {
 printf ("%d\n" ,i) ;
return 0;
}
}
return 0;
}

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

#include<bits/stdc++.h>
3
4 int main () {
5 char str [222];
6 scanf ("%s", str ) ;
7 int n= strlen (str ) ;
8 for (int i=n -2; i; i -=2) {
9 if( strncmp (str , str +i/2 , i/2) ==0) {
10 printf ("%d\n" ,i) ;
11 return 0;
12 }
13 }
14 return 0;
15 }

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 3
      | ^
Language: C++

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

 int main () {
 char str [222];
 scanf ("%s", str ) ;
 int n= strlen (str) ;
 for (int i=n -2; i; i -=2) {
 if( strncmp (str , str +i/2 , i/2) ==0) {
 printf ("%d\n" ,i) ;
 return 0;
 }
}
return 0;
 }

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

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

int isEvenstr(string s){
  if(s.size()%2!=0)return 0;
  if(s.substr(0,s.size()/2)+s.substr(0,s.size()/2)==s)return 1;
  return 0;
}

int main(){
  string s;
  cin>>s;
  for(i=s.size();0<i;i--){
    if(isEvenstr(s.substr(0,i))==1){
      cout<<i;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i=s.size();0<i;i--){
      |       ^
Language: C++

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

int isEvenstr(string s){
  if(s.size()%2!=0)return 0;
  if(s.substr(0,s.size/2)+s.substr(0,s.size/2)==s)return 1;
  return 0;
}

int main(){
  string s;
  cin>>s;
  for(i=s.size;0<i;i--){
    if(isEvenstr(s.substr(0,i))==1){
      cout<<i;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int isEvenstr(std::string)':
a.cc:6:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |   if(s.substr(0,s.size/2)+s.substr(0,s.size/2)==s)return 1;
      |                 ~~^~~~
      |                       ()
a.cc:6:40: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |   if(s.substr(0,s.size/2)+s.substr(0,s.size/2)==s)return 1;
      |                                      ~~^~~~
      |                                            ()
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i=s.size;0<i;i--){
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
main(){
  string s;
  cin>>s;
  int n=s.size();
  int ans=0;
  for(int i=0;i<n;++i){
    int len=n-i;
    if(len%2!=0)continue;
    int half=len/2;
    string ss=s.substr(0,half);
    string tt=s.substr(half,falf);
    if(ss==tt){
      cout<<ss.size()<<endl;
      return 0;
    }
  }
  cout<<0<<endl;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:29: error: 'falf' was not declared in this scope; did you mean 'half'?
   13 |     string tt=s.substr(half,falf);
      |                             ^~~~
      |                             half
Language: C++

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

int main() {
  string  w;
  cin >> w;
  
   for (int i = w.size()-3; i >= 0; i-=2){
    
       if(w[i] == w[(i/2)] ){
         cout << i << endl;
       }
     return 0;
   }
}
          
       
     
   
}


Compiler output:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main() {
  string  w;
  cin >> w;
  
   for (int i = w.size()-2; i >= 0; i-=2){
    
       if(w[i] == w[(i/2)] ){
         cout << i << endl;
       }
     return 0;
   }
}
          
       
     
   
}

Compiler output:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args) {

    Scanner kbd = new Scanner(System.in);
    String s = sc.next();

    int x = 0;

    for(int i = s.length()-1 ; i>0 ; i--){
      s = s.substring(0,i);
      String s1 = s.substring(0,i/2);
      String s2 = s.substring(i/2,i);

      if(s1.epuals(s2)){
        x = i;
        break;
      }
    }

  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    String s = sc.next();
               ^
  symbol:   variable sc
  location: class Main
Main.java:15: error: cannot find symbol
      if(s1.epuals(s2)){
           ^
  symbol:   method epuals(String)
  location: variable s1 of type String
2 errors
Language: C++

#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;

int main() {
    string S;
    cin >> S;
    bool flag = true;
    for (int i = 1; i < (S.length()-1); i++){
        flag = true;
        for (int j = 0; j < (S.length()-i); j++){
            if ((S.length()-i) % 2 == 0){
                for (int k = 0; k < ((S.length()-i) / 2); k++){
                    if (S[k] != S[((S.length()-i) / 2) + k]){
                        flag = false;
                        break;
                    }
                }
            }
            if (flag){
                cout << S.length()-i << endl;
                break;
            }
        }
        if (flag){
            break;
        }
    }
    if (flag == false) {
        cout << 1 << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string S;
      |     ^~~~~~
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> S;
      |     ^~~
a.cc:6:12: error: 'S' was not declared in this scope
    6 |     cin >> S;
      |            ^
a.cc:20:17: error: 'cout' was not declared in this scope
   20 |                 cout << S.length()-i << endl;
      |                 ^~~~
a.cc:20:41: error: 'endl' was not declared in this scope
   20 |                 cout << S.length()-i << endl;
      |                                         ^~~~
a.cc:29:9: error: 'cout' was not declared in this scope
   29 |         cout << 1 << endl;
      |         ^~~~
a.cc:29:22: error: 'endl' was not declared in this scope
   29 |         cout << 1 << endl;
      |                      ^~~~
Language: C++

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

int main() {
    string S;
    cin >> S;
    for (int i = 1; i < (S.length()-1); i++){
        bool flag = true;
        for (int j = 0; j < (S.length()-i); j++){
            if ((S.length()-i) % 2 == 0){
                for (int k = 0; k < ((S.length()-i) / 2); k++){
                    if (S[k] != S[((S.length()-i) / 2) + k]){
                        flag = false;
                        break;
                    }
                }
            }
            if (flag){
                cout << S.length()-i << endl;
                break;
            }
        }
        if (flag){
            break;
        }
    }
    if (flag == false) {
        cout << 1 << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'flag' was not declared in this scope
   30 |     if (flag == false) {
      |         ^~~~
Language: C++

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

int main() {
    string S;
    cin >> S;
    for (int i = 1; i < (S.length()-1); i++){
        bool flag = true;
        for (int j = 0; j < (S.length()-i); j++){
            if ((S.lenght()-i) % 2 == 0){
                for (int k = 0; k < ((S.lenght()-i) / 2); k++){
                    if (S[k] != S[((S.lenght()-i) / 2) + k]){
                        flag = false;
                        break;
                    }
                }
            }
            if (flag){
                cout << S.lenght()-i << endl;
                break;
            }
        }
        if (flag){
            break;
        }
    }
    if (flag == false;) {
        cout << 1 << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   13 |             if ((S.lenght()-i) % 2 == 0){
      |                    ^~~~~~
      |                    length
a.cc:14:41: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   14 |                 for (int k = 0; k < ((S.lenght()-i) / 2); k++){
      |                                         ^~~~~~
      |                                         length
a.cc:15:39: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   15 |                     if (S[k] != S[((S.lenght()-i) / 2) + k]){
      |                                       ^~~~~~
      |                                       length
a.cc:22:27: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   22 |                 cout << S.lenght()-i << endl;
      |                           ^~~~~~
      |                           length
a.cc:30:9: error: 'flag' was not declared in this scope
   30 |     if (flag == false;) {
      |         ^~~~
a.cc:30:23: error: expected primary-expression before ')' token
   30 |     if (flag == false;) {
      |                       ^
Language: C++

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

int main() {
    string S;
    cin >> S;
    bool flag = true;
    for (int i = 1; i < (S.length()-1); i++){
        for (int j = 0; j < (S.length()-i), j++){
            if ((S.lenght()-i) % 2 == 0){
                for (int k = 0; k < ((S.lenght()-i) / 2; k++){
                    if (S[k] != S[(S.lenght()-i) / 2 + k]){
                        flag = false;
                        cout << S.lenght()-i << endl;
                        break;
                    }
                }
            }
            if (flag == false){
                break;
            }
        }
        if (flag == false){
            break;
        }
    }
    if (flag) {
        cout << 1 << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:48: error: expected ';' before ')' token
   12 |         for (int j = 0; j < (S.length()-i), j++){
      |                                                ^
      |                                                ;
a.cc:13:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   13 |             if ((S.lenght()-i) % 2 == 0){
      |                    ^~~~~~
      |                    length
a.cc:14:41: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   14 |                 for (int k = 0; k < ((S.lenght()-i) / 2; k++){
      |                                         ^~~~~~
      |                                         length
a.cc:14:56: error: expected ')' before ';' token
   14 |                 for (int k = 0; k < ((S.lenght()-i) / 2; k++){
      |                                     ~                  ^
      |                                                        )
a.cc:15:38: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   15 |                     if (S[k] != S[(S.lenght()-i) / 2 + k]){
      |                                      ^~~~~~
      |                                      length
a.cc:17:35: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   17 |                         cout << S.lenght()-i << endl;
      |                                   ^~~~~~
      |                                   length
Language: C++

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

int main() {
    string S;
    cin >> S;
    bool flag = true;
    for (int i = 1; i < S.length()-1; i++){
        for (int j = 0; j < S.length()-i, j++){
            if ((S.lenght()-i) % 2 == 0){
                for (int k = 0; k < (S.lenght()-i) / 2; k++){
                    if (S[k] != S[(S.lenght()-i) / 2 + k]){
                        flag = false;
                        cout << S.lenght()-i << endl;
                        break;
                    }
                }
            }
            if (flag == false){
                break;
            }
        }
        if (flag == false){
            break;
        }
    }
    if (flag) {
        cout << 1 << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:46: error: expected ';' before ')' token
   12 |         for (int j = 0; j < S.length()-i, j++){
      |                                              ^
      |                                              ;
a.cc:13:20: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   13 |             if ((S.lenght()-i) % 2 == 0){
      |                    ^~~~~~
      |                    length
a.cc:14:40: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   14 |                 for (int k = 0; k < (S.lenght()-i) / 2; k++){
      |                                        ^~~~~~
      |                                        length
a.cc:15:38: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   15 |                     if (S[k] != S[(S.lenght()-i) / 2 + k]){
      |                                      ^~~~~~
      |                                      length
a.cc:17:35: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   17 |                         cout << S.lenght()-i << endl;
      |                                   ^~~~~~
      |                                   length
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool func(string s) {
  for(int i = 0;i < s.size() / 2;i++) {
    if(s.at(i) != s.at(i + s.size() / 2)) {
      return false;
    }
  }
  return true;
}
int main() {
  string s;
  cin >> s;
  while() {
    s.pop_back();
    s.pop_back();
    if(func(s)) {
      cout << s.size() << endl;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected primary-expression before ')' token
   14 |   while() {
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool func(string s) {
  for(int i = 0;i < n / 2;i++) {
    if(s.at(i) != s.at(i + n / 2)) {
      return false;
    }
  }
  return true;
}
int main() {
  string s;
  cin >> s;
  while() {
    s.pop_back();
    s.pop_back();
    if(func(s)) {
      cout << s.size() << endl;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'bool func(std::string)':
a.cc:4:21: error: 'n' was not declared in this scope
    4 |   for(int i = 0;i < n / 2;i++) {
      |                     ^
a.cc: In function 'int main()':
a.cc:14:9: error: expected primary-expression before ')' token
   14 |   while() {
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool func(stirng s) {
  for(int i = 0;i < n / 2;i++) {
    if(s.at(i) != s.at(i + n / 2)) {
      return false;
    }
  }
  return true;
}
int main() {
  string s;
  cin >> s;
  while() {
    s.pop_back();
    s.pop_back();
    if(func(s)) {
      cout << s.size() << endl;
      return 0;
    }
  }
}

Compiler output:
a.cc:3:11: error: 'stirng' was not declared in this scope
    3 | bool func(stirng s) {
      |           ^~~~~~
a.cc: In function 'int main()':
a.cc:14:9: error: expected primary-expression before ')' token
   14 |   while() {
      |         ^
a.cc:17:12: error: 'func' cannot be used as a function
   17 |     if(func(s)) {
      |        ~~~~^~~
Language: Java

import java.util.*;
public class Main{
	public static void main(Stirng[] args){
    	Scanner sc = new Scanner(System.in);
      String s = sc.next();
      boolean p = true;
      int n = 0;
      s = s.substring(0,s.length()-1);
      while(p){
        s = s.substring(0,n-1);
      	n = s.length();
        if(n%2==0 && s.substring(0,n/2).equals(s.substring(n/2,n)) ) p = false;
      }
      System.out.println(s.length());
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(Stirng[] args){
	                        ^
  symbol:   class Stirng
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  int s=S.size();
  int ans;
  for (int i=s/2;i>0;i--){
    bool a=true
    for (int j=0;j<i;j++){
      if (S[j]!=S[j+i]){
        a=false;
      }
    }
    if (a){
      ans=i*2;
      break;
    }
  }
  cout << ans << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'for'
   11 |     for (int j=0;j<i;j++){
      |     ^~~
a.cc:11:18: error: 'j' was not declared in this scope
   11 |     for (int j=0;j<i;j++){
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  int s=S.size();
  int ans;
  for (i=s/2;i>0;i--){
    bool a=true
    for (int j=0;j<i;j++){
      if (S[j]!=S[j+i]){
        a=false;
      }
    }
    if (a){
      ans=i*2;
      break;
    }
  }
  cout << ans << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   for (i=s/2;i>0;i--){
      |        ^
a.cc:11:5: error: expected ',' or ';' before 'for'
   11 |     for (int j=0;j<i;j++){
      |     ^~~
a.cc:11:18: error: 'j' was not declared in this scope
   11 |     for (int j=0;j<i;j++){
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
// マクロ
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
// 型エイリアス
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vi>;
using vvs = vector<vs>;

int main() {
    string s;
    cin >> s;
    int ans = 0;
    int stlen = s.size();
    for (int i = stlen -3; i > 0; i-= 2){
        if (i < 0) break;
        if (s.substr(0, i/2) == s.substr(i/2+1, i/2)){
            cout << i + 1 << endl;
            break;
        }

    }

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

#include<stdio.h>
#include<string.h>
int main(){
  char s[201];
  char t[100];
  char u[100];
  int i,ans;
  scanf("%s",s);
  int len=strlen(s);
  for(i=1; i<=(len/2); i++){
    len=len-2*i;
    strncpy(t,s+0,len/2);
    strncpy(u,s+(len/2)-1,len/2);
    if(strncmp(t,u)==0){
      ans=len;
      break;
    }
  }

  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:8: error: too few arguments to function 'strncmp'
   14 |     if(strncmp(t,u)==0){
      |        ^~~~~~~
In file included from main.c:2:
/usr/include/string.h:159:12: note: declared here
  159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
      |            ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  string s;
  cin>>s;
  while(1){
    s.push_back;
    s.push_back;
    if(s.substr(0,s.size()/2)==s.substr(s.size()/2)) break;
  }
  cout<<s.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   17 |     s.push_back;
      |     ~~^~~~~~~~~
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:1572:7: note: declared here
 1572 |       push_back(_CharT __c)
      |       ^~~~~~~~~
a.cc:18:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   18 |     s.push_back;
      |     ~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note: declared here
 1572 |       push_back(_CharT __c)
      |       ^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  string s
  cin>>s;
  while(1){
    s.push_back;
    s.push_back;
    if(s.substr(0,s.size()/2)==s.substr(s.size()/2)) break;
  }
  cout<<s.size()<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected initializer before 'cin'
   15 |   cin>>s;
      |   ^~~
a.cc:17:5: error: 's' was not declared in this scope; did you mean 'sc'?
   17 |     s.push_back;
      |     ^
      |     sc
a.cc:21:9: error: 's' was not declared in this scope; did you mean 'sc'?
   21 |   cout<<s.size()<<endl;
      |         ^
      |         sc
Language: C++

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

int main(){
    string s;
    cin>>s;
    for(;;){
        pop_back(s);
        pop_back(s);
        for(int j=0;;j++){
            if(s[j]!=s[j+s.size()/2]) break;
            if(j==s.size()/2-1){
                cout<<s.size()<<endl;
                return 0;
            }
        }
    }
}

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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define repr(i,a,b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define debug(x)  cout << #x << " = " << (x) << endl;
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

int main() {
  string S; cin >> S;
  
  int n = S.size();
  for(int i=n-2; i; i-=2) {
    if(strncmp(str; str+i/2; i/2)==0) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:16: error: 'str' was not declared in this scope; did you mean 'std'?
   26 |     if(strncmp(str; str+i/2; i/2)==0) {
      |                ^~~
      |                std
a.cc:26:19: error: expected ')' before ';' token
   26 |     if(strncmp(str; str+i/2; i/2)==0) {
      |       ~           ^
      |                   )
a.cc:26:21: error: 'str' was not declared in this scope; did you mean 'std'?
   26 |     if(strncmp(str; str+i/2; i/2)==0) {
      |                     ^~~
      |                     std
a.cc:26:33: error: expected ';' before ')' token
   26 |     if(strncmp(str; str+i/2; i/2)==0) {
      |                                 ^
      |                                 ;
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repf(i,a,b) for (int i = (a); i < (b); i++)
#define repi(i,a,b) for (int i = (a); i <= (b); i++)
#define repr(i,a,b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define debug(x)  cout << #x << " = " << (x) << endl;
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;

int main() {
  string S; cin >> S;
  
  int n = S.size();
  for(int i=n-2; i; i-=2) {
    if(strncmp(str, str+i/2, i/2)==0) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:16: error: 'str' was not declared in this scope; did you mean 'std'?
   26 |     if(strncmp(str, str+i/2, i/2)==0) {
      |                ^~~
      |                std
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  char s[201];
  scanf("%s",s);
  int n=strlen(s);
  int m=n;
  for(int i=n-2;i;i-2){
    if((strncmp(s,s+i/2,i/2)=0){
      printf("%d",i);
      return 0;
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:9:29: error: lvalue required as left operand of assignment
    9 |     if((strncmp(s,s+i/2,i/2)=0){
      |                             ^
main.c:9:32: error: expected ')' before '{' token
    9 |     if((strncmp(s,s+i/2,i/2)=0){
      |       ~                        ^
      |                                )
main.c:13:3: error: expected expression before '}' token
   13 |   }
      |   ^
Language: C++

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

int main() {
  string s; cin>>s;
  if(s.size()=2) cout<<1<<endl;
  else{
    if(s.size()%2!=0) s=s.substr(0,s.size()-1);
    else s=s.substr(0,s.size()-2);
    int size=s.size();
    for(int i=0; i<size/2;i++){
      string s1,s2;
      s1=s.substr(0,size/2);
      s2=s.substr(size/2);
      if(s1==s2){
        cout<<size<<endl;
        break;
      }
      else{
        s=s.substr(0,s.size()-2);
        size=s.size();
      }
    }
  }
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: lvalue required as left operand of assignment
    6 |   if(s.size()=2) cout<<1<<endl;
      |      ~~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s,t;
  cin >> s;
  int ans;
  t=s
  for (int i=0;i<t.size()/2;i++){
    s=s.substr(0,s.size()-2);
    if(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2)){
      break;
    }
  }
  cout << s.size() << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'for'
    7 |   t=s
      |      ^
      |      ;
    8 |   for (int i=0;i<t.size()/2;i++){
      |   ~~~ 
a.cc:8:16: error: 'i' was not declared in this scope
    8 |   for (int i=0;i<t.size()/2;i++){
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string S;
  cin>>S;
  
  for(int i=S.size()-2;i>=0;i--){
if(i%2==0){
  continue;
}
   else{
string T;
     for(int j=0;j<i+1;j++){
       T.at(j)=S.at(j);
     }
string U=T;
     
     revers(T.begin(),T.end());
     
     if(U==T){
cout<<T.size()<<endl;
       break;
     }
   }
  }
}

     
    

    


Compiler output:
a.cc: In function 'int main()':
a.cc:18:6: error: 'revers' was not declared in this scope
   18 |      revers(T.begin(),T.end());
      |      ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string S;
  cin>>S;
  
  for(int i==S.size()-2;i>=0;i--){
if(i%2==0){
  continue;
}
   else{
string T(i);
     for(int j=0;j<i+1;j++){
       T.at(j)=S.at(j);
     }
string U=T;
     
     revers(T.begin(),T.end());
     
     if(U==T){
cout<<T.size()<<endl;
       break;
     }
   }
  }
}

     
    


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before '==' token
    7 |   for(int i==S.size()-2;i>=0;i--){
      |            ^~
      |            ;
a.cc:7:12: error: expected primary-expression before '==' token
    7 |   for(int i==S.size()-2;i>=0;i--){
      |            ^~
a.cc:7:29: error: expected ')' before ';' token
    7 |   for(int i==S.size()-2;i>=0;i--){
      |      ~                      ^
      |                             )
a.cc:7:30: error: 'i' was not declared in this scope
    7 |   for(int i==S.size()-2;i>=0;i--){
      |                              ^
Language: C++


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

  for(int i=S.size()-2;i>=0;i--){
    int X=0;
    vector<int>vec(26);
    for(int s=0;s<26;s++){
vec.at(s)=0;
    }
    
    
    for(int j=0;j<i+1;j++){
      int Y=S.at(j)-'a';
    vec.at(Y)++;
  }
    
    for(int k=0;k<26;k++){
      if(vec.at(k)%2==0){
        X++;
      }
    }
    if(X==26){
      cout<<i+1<<endl;
    break;
    }
    
  }
  

    
    
    


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

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin>>s;
  int ans=0;
  for(int i=0;i<s.size()/2;i++){
    s.erase( s.size()-1, 1 );
    if(s.size%2==0){
      if(f(s)){
        ans=s.size();
        break;
      }
    }
  }
  cout<<ans<<endl;
}
    







Compiler output:
a.cc: In function 'int main()':
a.cc:38:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   38 |     if(s.size%2==0){
      |        ~~^~~~
      |              ()
Language: C++

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()-1-i]){
      ans=false;
      break;
    }
  }
  return ans;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin>>s;
  ans=0;
  for(int i=0;i<s.size()/2;i++){
    s.erase( 0, 2 );
    if(f(s)){
      ans=s.size();
      break;
    }
  }
  cout<<ans<<endl;
}
    
    
  
 


}





Compiler output:
a.cc: In function 'int main()':
a.cc:35:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |   ans=0;
      |   ^~~
      |   abs
a.cc: At global scope:
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
 
template <class T> using V = vector<T>;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(ll)(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
ll combi(ll n,ll m) {
  ll ans=1;
  rFOR(i,n,n-m){
    ans*=i;
  }
  FOR(i,1,m+1){
    ans/=i;
  }
  return ans;
}
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  st s;
  	ci(s);
  ll a=s.sz;
  for(ll k=(a-2);k>0;k-=2){
    FOR(i,0,k/2){
      ll count=0;
      if(s[i]!=s[k/2+i]){
          break;
      }
      else count++;
    }
    
    if(count==(k/2)){
      co(k)
        break;
    }
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:88:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator=='
   88 |     if(count==(k/2)){
      |        ~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
 
template <class T> using V = vector<T>;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(ll)(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
ll combi(ll n,ll m) {
  ll ans=1;
  rFOR(i,n,n-m){
    ans*=i;
  }
  FOR(i,1,m+1){
    ans/=i;
  }
  return ans;
}
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  st s;
  	ci(s);
  ll a=s.sz;
  for(ll k=(a-2);k>0;k-=2){
    FOR(i,0,k/2){
      ll count=0;
      if(s[i]!=s[k/2+i]){
          break;
      }
      else count++;
    }
    if(count==k/2){
      co(k)
        break;
    }
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:87:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator=='
   87 |     if(count==k/2){
      |        ~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
 
template <class T> using V = vector<T>;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(ll)(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
ll combi(ll n,ll m) {
  ll ans=1;
  rFOR(i,n,n-m){
    ans*=i;
  }
  FOR(i,1,m+1){
    ans/=i;
  }
  return ans;
}
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  st s;
  	ci(s);
  ll a=s.sz;
  for(ll k=(a-2);k>0;k-=2){
    FOR(i,0,k/2){
      ll count=0;
      if(s[i]!=s[i/2+i]){
          break;
      }
      else count++;
    }
    if(count==k/2){
      co(k)
        break;
    }
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:87:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator=='
   87 |     if(count==k/2){
      |        ~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
 
template <class T> using V = vector<T>;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(ll)(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
ll combi(ll n,ll m) {
  ll ans=1;
  rFOR(i,n,n-m){
    ans*=i;
  }
  FOR(i,1,m+1){
    ans/=i;
  }
  return ans;
}
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  st s;
  	ci(s);
  ll a=s.sz;
  for(ll k=(a-2);k>0;k-=2){
    FOR(i,0,k/2){
      ll count=0
      if(s[i]!=s[i/2+i]){
          break;
      }
      else count++;
    }
    if(count==k/2){
      co(k)
        break;
    }
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:82:7: error: expected ',' or ';' before 'if'
   82 |       if(s[i]!=s[i/2+i]){
      |       ^~
a.cc:85:7: error: 'else' without a previous 'if'
   85 |       else count++;
      |       ^~~~
a.cc:87:13: error: invalid operands of types '<unresolved overloaded function type>' and 'll' {aka 'long long int'} to binary 'operator=='
   87 |     if(count==k/2){
      |        ~~~~~^~~~~