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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  
  for (int i = s.length()-2; i >= 2; i -= 2) {
    vector<char> zen(i/2), kou(i/2);
    for (int j = 0; j < i; j++) {
      if (j < i/2)
        zen[j] = s[j];
      else
        kou[j - i/2] = s[j];
    }
    bool check = true;
    for (int j = 0; j < i/2; j++) {
      if (zen[j]!=kou[j]) {
        check = false;
        break;
      }
    }
    if (check) {
      cout << i;
      break
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before '}' token
   25 |       break
      |            ^
      |            ;
   26 |     }
      |     ~
Language: C++

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

using str = string;
using ll = long long;

int a[26];

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    str s;cin>>s;
    
    int ans=s.size();
    
    for(int i=s.size()-1;i>=0;i--)
    {
        a[s[i]-'a']++;
        ans--
        bool c=true;
        for(int j=0;j<26;j++)if(a[j]%2) c=false;
        if(c)break;
    }
    
    cout<<ans<<"\n";
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected ';' before 'bool'
   21 |         ans--
      |              ^
      |              ;
   22 |         bool c=true;
      |         ~~~~  
a.cc:23:41: error: 'c' was not declared in this scope
   23 |         for(int j=0;j<26;j++)if(a[j]%2) c=false;
      |                                         ^
a.cc:24:12: error: 'c' was not declared in this scope
   24 |         if(c)break;
      |            ^
Language: C++

// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <boost/xpressive/xpressive_static.hpp>

#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, int(n) + 1)
#define RREP(i, n) RFOR(i, 0, n)
#define RREP1(i, n) RFOR(i, 1, int(n) + 1)
#define ALL(c) begin(c), end(c)

int _ = (
#ifndef LOCAL
    std::cin.tie(nullptr), std::ios::sync_with_stdio(false),
#endif
    std::cout.precision(10), std::cout.setf(std::ios::fixed));

using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T> using vec = std::vector<T>;
using namespace std;
using namespace boost::xpressive;

int main() {
  string S;
  cin >> S;

  S.pop_back();
  boost::xpressive::smatch m;
  const sregex re = bos >> (s1 = +lower) >> s1;
  regex_search(S, m, re));
  cout << m.str().length() << endl;
  return 0;
}


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

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

int main()
{
    int n, x, i, y;
    char s[500];
    gets(s);
    n = strlen(s);
    x = n;
    while(1)
    {
        x = x - 2;
        y = strncmp((s), (s+(x/2)), (x/2));
        if(y==0)
        {
            cout << x << endl;
            break;
        }
    }
    return 0;
}

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

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    string s;
    cin >> s;
    for (int i = n - 2; i >= 0; i--) {
        string t = s.substr(0, i);
        if (t.size() % 2 == 0) {
            bool ok = true;
            for (int i = 0; i < t.size() / 2; i++) {
                if (t[i] != t[i + t.size() / 2]) {
                    ok = false;
                    break;
                }
            }
            if (ok) {
                cout << t << endl;
                return 0;
            }
        }
    }
}


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

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

	int i, j;
	string s;
	cin >> s;
	n = s.size();
	int ans=0, r=s.size()-2;
	for(i=n-2; i; i-=2){
		bool ok = 1;
		for(j=0;j<i/2;j++){
			if(s[j]!=s[j+i/2])ok=0;
		}if(ok){
			cout << i;
			return 0;
		}
	}return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  cin >> a;
  bool f = false;
  for (int j = a.size(); j >=0; j-=2) {
    if (j%2 == 1 && f == false) {
      f = true;
      a.pop_back();
    }
    if (a.substr(0, a.size()/2); == a.substr(a.size()/2, a.size()-1); && f) {
      cout << j << endl;
      break;
    }
    a.pop_back();
    a.pop_back();
    f = true;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   12 |     if (a.substr(0, a.size()/2); == a.substr(a.size()/2, a.size()-1); && f) {
      |         ~~~~~~~~^~~~~~~~~~~~~~~
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:3208:7: note: declared here
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |       ^~~~~~
a.cc:12:34: error: expected primary-expression before '==' token
   12 |     if (a.substr(0, a.size()/2); == a.substr(a.size()/2, a.size()-1); && f) {
      |                                  ^~
a.cc:12:69: error: expected ')' before ';' token
   12 |     if (a.substr(0, a.size()/2); == a.substr(a.size()/2, a.size()-1); && f) {
      |        ~                                                            ^
      |                                                                     )
a.cc:12:75: error: expected ';' before ')' token
   12 |     if (a.substr(0, a.size()/2); == a.substr(a.size()/2, a.size()-1); && f) {
      |                                                                           ^
      |                                                                           ;
a.cc:12:74: error: label 'f' used but not defined
   12 |     if (a.substr(0, a.size()/2); == a.substr(a.size()/2, a.size()-1); && f) {
      |                                                                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool Check(string input){
    
    if(input.size()%2 == 1){
        return false;
    }
    else{
        int len = input.size() / 2;
        for(int i=0;i<len;i++){
            if(input[i] != input[i+len]) return false;
        }
        return true;
    }
}
int main(void){
    
 string S;
 cin >> S;
 int N = S.size();
 
 for(int i=N-1;i>=0;i--){
    if(Check(S.substr(0,i))){cout << S.substr(0,i).size() << endl; return 0;}
 } 

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

#include<bits/stdc++.h>

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

bool Ok(const string&s,int n){
  bool f = true;
  if(n%2==1)return false;
  for(i = 0; i < n/2; ++i)f &= s[i] == s[i+n];
  return f;
}

int main(){
  string s; cin >> s;
  int n = (int)s.size();
  for(int i = n-2; i >= 0; i-=2){
    if(Ok(s,i)){
      cout << i << endl;
      return 0;
    }
  }
}


Compiler output:
a.cc: In function 'bool Ok(const std::string&, int)':
a.cc:42:7: error: 'i' was not declared in this scope
   42 |   for(i = 0; i < n/2; ++i)f &= s[i] == s[i+n];
      |       ^
Language: C++

/*
 * atcoder/abc089/b.cpp
 */

// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
void solve();
int main() { solve(); return 0; }

#define ull unsigned long long
void solve() {
  string s; cin >> s;
  for (int count=2; count<n; count += 2) {
    string s2 = s.substr(0, n-count);
    if (s2.substr(0, s2.size()) == s2.substr(s2.size())) {
      cout << count << endl;
      return;
    }
  }
  cout << -1 << endl;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:21:27: error: 'n' was not declared in this scope
   21 |   for (int count=2; count<n; count += 2) {
      |                           ^
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		int length = S.length();

		while(true) {
			if ((S.length() -1) % 2 == 0) {
				String sub1 = S.substring(0, S.length() / 2);
//				System.out.println("sub1:" + sub1);
				String sub2 = S.substring(S.length() / 2, S.length() -1);
//				System.out.println("sub2:" + sub2);
				if (sub1.equals(sub2)) {
					System.out.println(S.length()-1);
					return;
				} else {
					S = S.substring(0, (S.length()-1));
				}
			} else {
				S = S.substring(0, (S.length()-1));
			}
//			System.out.println(S);
		}
	}
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: expected ')' before '{' token
    8 |     if(s.substr(0,i/2)==s.substr(i/2,i/2){
      |       ~                                  ^
      |                                          )
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: C++

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

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

  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected primary-expression before ';' token
    7 |   for(int i=s.size()-2;i>-;i-=2){
      |                           ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  s.push_back();
  int hu=0;
  for(int i=s.size()-2;i>-;i-=2){
    if(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2)){
      cout<<s.size()<<endl;
      return 0;
    }
  }
}
  

  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
    7 |   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: candidate: 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note:   candidate expects 1 argument, 0 provided
a.cc:9:27: error: expected primary-expression before ';' token
    9 |   for(int i=s.size()-2;i>-;i-=2){
      |                           ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  s.push_back();
  int hu=0;
  for(int i=0;i<s.size();i++){
    if(s.size()%2!=0){
      s.push_back();
      continue;
    }
    if(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2)){
      cout<<s.size()<<endl;
      return 0;
    }
    else{
      s.push_back();
    }
  }
}
    

  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
    7 |   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: candidate: 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note:   candidate expects 1 argument, 0 provided
a.cc:11:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
   11 |       s.push_back();
      |       ~~~~~~~~~~~^~
/usr/include/c++/14/bits/basic_string.h:1572:7: note: candidate: 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note:   candidate expects 1 argument, 0 provided
a.cc:19:18: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
   19 |       s.push_back();
      |       ~~~~~~~~~~~^~
/usr/include/c++/14/bits/basic_string.h:1572:7: note: candidate: 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1572:7: note:   candidate expects 1 argument, 0 provided
Language: C++

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

int main() {
  string S; cin >>S;
  vector<char> vec(S.size());
  rep(i,0,S.size()) vec[i]=S[i];
  while(true) {
    vec.pop_back();
    if (vec.size()%2) continue;
    else {
      int count=0;
      rep(i,0,vec.size()/2) {
        if (vec[i]==vec[(vec.size()/2)+i)] count++;
      }
      if (count==(int)(vec.size())/2) {
        cout <<vec.size() <<endl;
        break;
      }
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:41: error: expected ']' before ')' token
   16 |         if (vec[i]==vec[(vec.size()/2)+i)] count++;
      |                                         ^
      |                                         ]
a.cc:16:42: error: expected primary-expression before ']' token
   16 |         if (vec[i]==vec[(vec.size()/2)+i)] count++;
      |                                          ^
Language: Java

import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	String s=sc.next();
    int n=s.length();
    for(int i=0;i<s.length();i+=2){
      String a=s.substring(0,2/n),b=s.substring(2/n,n);
      if(a.equals(b)){
        Systen.out.println(n);
        break;
      }
      s=s.substring(0,n-2);
      n=s.length();
    }
  }
}


Compiler output:
Main.java:12: error: package Systen does not exist
        Systen.out.println(n);
              ^
1 error
Language: Java

import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	String s=sc.next();
    int n=s.length()
    for(int i=0;i<s.length();i+=2){
      String a=s.substring(0,2/n),b=s.substring(2/n,n);
      if(a.equals(b)){
        Systen.out.println(n);
        break;
      }
      s=s.substring(0,n-2);
      n=s.length();
    }
  }
}


Compiler output:
Main.java:8: error: ';' expected
    int n=s.length()
                    ^
1 error
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:
main.c:1:11: fatal error:  stdio .h : No such file or directory
    1 | # include < stdio .h >
      |           ^~~~~~~~~~~~
compilation terminated.
Language: C++

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


 int main(){

 string ani; cin>>ani;

  int n = ani.length();
  for(int i = n-2;i>=0;i-=2){

    if(strncmp(str,str+i/2,i/2) == 0){
        cout<<i<<endl;
         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 main(){
  string s;
  cin>>s;
  s.pop_back();
  while(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size())){
    s.pop_back;
  }
  cout<<s.size()<<endl;
}
    
        
 


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
    9 |     s.pop_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:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <tuple>
#include <cassert>
#include <array>
#include <iomanip>

using namespace std;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;

const double eps=1e-14;
const int mod = 1e9 + 7;
const int inf = ((1<<30));
const long long linf = (1LL<<60);

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    int ans = 0;
    s = s.substr(0, tmp-2);
    while(true)
    {
        int tmp = s.size();
        if(s.substr(0,tmp/2) == s.substr(tmp/2, tmp/2))
        {
            ans = tmp;
            break;
        }
        s = s.substr(0, tmp-2);
    }
    cout << ans << endl;
    return 0;
}



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

#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <tuple>
#include <cassert>
#include <array>
#include <iomanip>

using namespace std;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;

const double eps=1e-14;
const int mod = 1e9 + 7;
const int inf = ((1<<30));
const long long linf = (1LL<<60);

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



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

#include <iostream>
#include <string>

using namespace std;

int main(int argc, char const *argv[])
{
    string S;
    cin >> S;

    string str1, str2;
    for (int i = 0; i < S.size(); i++)
    {
        S.pop_back();
        if (S.size() % != 0) continue;
        str1 = S.substr(0, (S.size() / 2));
        str2 = S.substr((S.size() / 2), (S.size() / 2));
        if (str1 == str2) break;
    }
    
    cout << S.size() / 2 << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:24: error: expected primary-expression before '!=' token
   15 |         if (S.size() % != 0) continue;
      |                        ^~
Language: C++

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

int main() {
  string S;
  cin >> S;
  if(S.size() == 2) { cout << 0; return 0; }
  for(int i = 0; i < S.size() - 2; i++) {
    S.pop_back();
    int N = S.size();
    if(S.substr(0, N / 2) == S.substr(N / 2, N / 2)) {
      cout << S.size() - 1;1
      return 0;
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected ';' before 'return'
   14 |       cout << S.size() - 1;1
      |                             ^
      |                             ;
   15 |       return 0;
      |       ~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
typedef long long ll;
namespace mp = boost::multiprecision;
using Mint = mp::cpp_int;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = int(a); i < int(b); i++)
#define all(v) v.begin(), v.end()
#define uni(v) v.erase(unique(all(v)), v.end())
#define sort_g(v) sort(all(v), greater<int>())
#define dump(x) cerr << #x << ' ' << '=' << ' ' << x << endl

bool is_even(string S) {
    int l = S.size() / 2;
    string sub_1 = S.substr(0, l);
    string sub_2 = S.substr(l, l);
    if(sub_1 == sub_2) return true;
    else return false;
}

int main() {
    string S;
    cin >> S;

    int l = 0;
    for(int i = S.size() - 2; i >= 1; i -= 2) {
        string sub = S.substr(0, i);
        dump(sub);
        if(is_even(sub)) {
            l = sub.size();
            break;
        }
    }

    cout << l << endl;
}

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

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

int main(){
  int count=0;
  string data,data1,data2;
  cin>>data;
  if(data.size()%2==0){
    count+=2
    data1=data.substr(0,data.size()/2-1);
    data2=data.substr(data.size()/2-1,data.size()/2-1);
  }
  else if(data.size()%2!=0){
    count+=1;
    data1=data.substr(0,(int)data.size()/2);
    data2=data.substr((int)data.size()/2,(int)data.size()/2);
  }
  while(data1==data2){
    count+=1;
    data1=data.substr(0,(int)(data.size()-count)/2);
    data2=data.substr((int)(data.size()-count)/2,(int)(data.size()-count)/2);
  }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before 'data1'
   10 |     count+=2
      |             ^
      |             ;
   11 |     data1=data.substr(0,data.size()/2-1);
      |     ~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: 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 '()' ?)
    7 |     s=s.substr(0,s.size-2);
      |                  ~~^~~~
      |                        ()
Language: C++

#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main() {
	string s;
	int cnt=0;
	getline(cin,s);
	for(int i=s/2;i>=0;i--){
		for(int j=1;j<=i;i++){
			if(s[j-1]==s[j-1+i])cnt++;
		}
		if(cnt==i){
			cout<<i;
			break;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: no match for 'operator/' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    9 |         for(int i=s/2;i>=0;i--){
      |                   ~^~
      |                   | |
      |                   | int
      |                   std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

#define ll long long
#define vecll vector<long long>
#define vec2ll vector<vector<long long>>
#define vecbool vector<bool>
#define vecpairll vector<pair<long long,long long>>
#define forll(s,a,b) for(long long s = a;s < b;s++)
#define forllde(s,a) for(long long s = a;s > 0;s--)


bool evenStr(string s){
  forll(i, 0, s.size() / 2){
	if(s[i] != s[i + s.size/2])
	  return false;
  }
  return true;
}


int main()
{
  string s;
  cin >> s;
  forll(i, 0, s.size() / 2){
	s.pop_back();
	s.pop_back();
	if (evenStr(s))
	  break;
  }
  cout << s.size() << endl;	
}


Compiler output:
a.cc: In function 'bool evenStr(std::string)':
a.cc:16:28: 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 '()' ?)
   16 |         if(s[i] != s[i + s.size/2])
      |                          ~~^~~~
      |                                ()
Language: C++

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

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

# include < stdio .h >
2 # include < string .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 }

#include<stdio.h>
#include<string.h>
int main(void){
  char str[222];
  scanf("%s",str);
  int n=strlen(str);
  for(int loop=n-2;loop;loop-=2){
    if(strncmp(str,str+loop/2,loop/2)==0){
      printf("%d\n",loop);
      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 <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <cmath>


using namespace std;
using ll = long long;

string str;

ll ans = 0;

int main() {
	cin >> str;
	for (ll i = 0; i < str.length / 2; i++)
	{
		if (str.substr(0, (size_t)i + 1) == str.substr((size_t)i + 1, (size_t)i + 1)) {
			ans = max(ans, i);
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |         for (ll i = 0; i < str.length / 2; i++)
      |                            ~~~~^~~~~~
      |                                      ()
Language: C

 #include<bits/stdc++.h>
 
 using namespace std;
 typedef long long ll;
 #define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
 const long long MODNUM = 7;
 
 int main() {
 
     string s; cin >> s;
     // 最初に1文字必ず消す必要がある
     string tmp = s.substr(0, s.size()-1);
     while(tmp.size() >= 2) {
         if(tmp.size() % 2 == 0) {
             string prev = tmp.substr(0, tmp.size()/2);
             string post = tmp.substr(tmp.size()/2, tmp.size()/2);
             if(prev == post) {
                 // 長い順に見てるので、できた時点でそれが最長
                 cout << tmp.size() << endl;
                 return 0;
             }
         }
         tmp = tmp.substr(0, tmp.size()-1);
     }
 
     cout << 1 << endl;
     return 0;
 }

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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <functional>
using namespace std;

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

    }
    if(f == false){ break; }
  }
  

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

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
bool flag[3][3];
int cnt[2][105];
int h, w;
int choco[1010][1010];
int s[11][11];

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


Compiler output:
a.cc: In function 'int main()':
a.cc:65:13: error: 'i' was not declared in this scope
   65 |         for(i = n - 3;i >= 0;i-=2) {
      |             ^
a.cc:67:22: error: 'j' was not declared in this scope
   67 |                 for (j = 0;j <(i+1)/2;++j) {
      |                      ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
bool flag[3][3];
int cnt[2][105];
int h, w;
int choco[1010][1010];
int s[11][11];

int main() {
	string s;
	cin >> s;
	int n = s.length();
	int ans = 0;
	rep(i = n - 3;i >= 0;i-=2) {
		bool flag = true;
		for (j = 0;j <(i+1)/2;++j) {
			if (s[j] != s[(i + 1) / 2 + j])flag = false;
		}
		if (flag)break;
		ans += 2;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc:65:34: error: macro "rep" requires 2 arguments, but only 1 given
   65 |         rep(i = n - 3;i >= 0;i-=2) {
      |                                  ^
a.cc:2:9: note: macro "rep" defined here
    2 | #define rep(i,n)for(int i=0;i<n;++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:65:9: error: 'rep' was not declared in this scope
   65 |         rep(i = n - 3;i >= 0;i-=2) {
      |         ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>

using namespace std;

int main() {
    string s;

    cin >> s;

    for (int i = 0; i < s.size(); i++) {
        s.pop_back();
        if (s.size() == 2) {
            if (s[0] == s[1]) {
                cout << s.size() << endl;
            }
        } else (s.size() == 1) {
            cout << s.size() << endl;
        }
        if (s.size() % 2 == 0) {
            int num = s.size() / 2;
            if (s.substr(0, num) == s.substr(num, s.size())) {
                cout << s.size() << endl;
            }
        }
    }

    return 0;
}
         

Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: expected ';' before '{' token
   20 |         } else (s.size() == 1) {
      |                               ^~
      |                               ;
Language: C++

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

int main() {
  string s;cin>>s;
  while (s.size()>0) {
    s.pop_back();
    if (s.size()%2!=0) continue;
    rep(i,n/2) if (s[i]!=s[i+n/2]) continue;
    cout << s.size();
    return 0;
    
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'n' was not declared in this scope
   10 |     rep(i,n/2) if (s[i]!=s[i+n/2]) continue;
      |           ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include<iostream>
#include<vector>
#include <cmath>
#include <map>
#include <algorithm>
#include <string.h>
using namespace std;
int main(void){

 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: In function 'int main()':
a.cc:19:11: error: expected '}' at end of input
   19 |  return 0;
      |           ^
a.cc:8:15: note: to match this '{'
    8 | int main(void){
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before 'j'
   12 |     for (int j = 0; j < i / 2 j++) {
      |                              ^~
      |                              ;
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << '\n'

typedef int64_t Int;
const double pi = M_PI;

using namespace std;

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

    string a, b;

    for (int i = 0; i < n.size(); i++) {
        if (n.size() - i % 2 == 0) {
            a = n.substr(0, (n.size() - i) / 2);
            b = n.substr((n.size() - i) / 2, n.size());
            if (a == b) {
                cout << n.size() - i << endl;
                break
            }
        }
    }

    cout << 0 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:22: error: expected ';' before '}' token
   22 |                 break
      |                      ^
      |                      ;
   23 |             }
      |             ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: expected ';' before 'count'
   11 |             if(s.at(j)==s.at(j+((i+1)/2)) count++;
      |                                          ^~~~~~
      |                                          ;
a.cc:12:9: error: expected primary-expression before '}' token
   12 |         }
      |         ^
a.cc:11:51: error: expected ')' before '}' token
   11 |             if(s.at(j)==s.at(j+((i+1)/2)) count++;
      |               ~                                   ^
      |                                                   )
   12 |         }
      |         ~                                          
a.cc:12:9: error: expected primary-expression before '}' token
   12 |         }
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin>>s; int c=0;
for(int i=s.length()-2;i>=0;i--){
 if(s[i]==s[s.length()-1]){if((s.length()-i)%2==0)cout<<s.length()-i;break;else continue ;}
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:76: error: expected '}' before 'else'
    6 |  if(s[i]==s[s.length()-1]){if((s.length()-i)%2==0)cout<<s.length()-i;break;else continue ;}
      |                           ~                                                ^~~~
a.cc: At global scope:
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected primary-expression before '=' token
   10 |                 sl - = 2;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string S;cin>>S;
  while(1){
    S.erase(S.size()-2,2);
    for(int i=0;i<S.size()/2;i++)if(S.at(i)!=S.at(i+S.size()/2))break;
    if(i==S.size()/2)break;
  }
  cout<<S<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |     if(i==S.size()/2)break;
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  string S;
  cin >> S;
  if(S.length==4){
    cout<<2<<endl:
    return 0;
  }
  
  for(int i=2;i<S.length()+1;i=i+2){
    S=S.erase(S.length()-2);
    if(S.substr(S.length()/2)==S.substr(0,S.length()/2)){
      cout<<S.length()<<endl;
      return 0;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |   if(S.length==4){
      |      ~~^~~~~~
      |              ()
a.cc:8:18: error: expected ';' before ':' token
    8 |     cout<<2<<endl:
      |                  ^
      |                  ;
Language: C++

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

typedef long long ll;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl

const int maxn = 1e6 + 5;

int main() {
  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
  string s; cin>>s;
  s.pop_back() s.pop_back();
  while (1) {
    int n = s.length();
    if (s.substr(0,n/2) == s.substr(n/2)) out(n);
    s.pop_back(); s.pop_back();
  }
  assert(0);
  

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before 's'
   15 |   s.pop_back() s.pop_back();
      |               ^~
      |               ;
Language: C++

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

typedef long long ll;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl

const int maxn = 1e6 + 5;

int main() {
  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
  string s; cin>>s;
  s.pop_back() s.pop_back();
  while (1) {
    int n = s.length();
    if (s.substr(0,n/2) == s.substr(n/2)) out(n);
    s.pop_back() s.pop_back();
  }
  assert(0);
  

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before 's'
   15 |   s.pop_back() s.pop_back();
      |               ^~
      |               ;
a.cc:19:17: error: expected ';' before 's'
   19 |     s.pop_back() s.pop_back();
      |                 ^~
      |                 ;
Language: C++

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

typedef long long ll;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl

const int maxn = 1e6 + 5;

int main() {
  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
  stirng s; cin>>s;
  s.pop_back() s.pop_back();
  while (1) {
    int n = s.length();
    if (s.substr(0,n/2) == s.substr(n/2)) out(n);
    s.pop_back() s.pop_back();
  }
  assert(0);
  

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'stirng' was not declared in this scope
   14 |   stirng s; cin>>s;
      |   ^~~~~~
a.cc:14:18: error: 's' was not declared in this scope
   14 |   stirng s; cin>>s;
      |                  ^
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:9: fatal error: stdio .h: No such file or directory
    1 | #include<stdio .h>
      |         ^~~~~~~~~~
compilation terminated.
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:
main.c: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 main() {

  string a;
  cin>>a;
  
  for(int i=1;i<=a.length()/2;i++){
    a.pop_back();a.pop_back();
    for(int j=0;j<a.length()/2;j++){
      if(a.at(i)!=a.at(i+a.length()/2))break;
    else{cout<<i*2<<endl;}}
}






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

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

int main() {

  string a;
  cin>>a;
  
  for(int i=1;i<=a.length()/2;i++){
    a.pop_back();a.pop_back();
    for(int j=0;j<a.length()/2;j++){
      if(a.at(i)!=a.at(i+a.length()/2))break;}
    else{cout<<i*2<<endl;}
}






Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else{cout<<i*2<<endl;}
      |     ^~~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {

  string a;
  cin>>a;
  
  for(int i=1;i<=a.length()/2;i++;){
    a.pop_back();a.pop_back();
    for(int j=0;j<a.length()/2;j++){
      if(a.at(i)!=a.at(i+a.length()/2))break;}
    else{cout<<i*2<<endl;}
}






Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: expected ')' before ';' token
    9 |   for(int i=1;i<=a.length()/2;i++;){
      |      ~                           ^
      |                                  )
a.cc:9:35: error: expected primary-expression before ')' token
    9 |   for(int i=1;i<=a.length()/2;i++;){
      |                                   ^
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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();
   int N = c.length;
   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:23: error: variable ans might not have been initialized
   System.out.println(ans);
                      ^
1 error