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

#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <unordered_map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#define MP(a, b) make_pair(a, b)
#define MMP(a, b, c) make_pair(make_pair(a, b), c)
#define MAX 1000000000
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483647
#define INT_MAX 2147483647
#define LL_MIN (LL)-9223372036854775807
#define LL_MAX (LL)9223372036854775807
#define PI 3.14159265359

int main(){
    iostream::sync_with_stdio(false);
    
    string S;
    cin >> S;
    int c[26] = {};
    int t = 0;
    for(int i=0; i<S.size(); i++){
        c[S[i]-'a']++;
        if(c[S[i]-'a'] % 2 == 1) t++;
        else t--;
    }
    while(t > 0){
        c[S[S.size()-1]-'a']--;
        if(c[S[S.size()-1]-'a'] % 2 == 1) t++;
        else t--;
        S = S.substr(0,S.size-2);
    }
    cout << S << endl;

    return 0;
}


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

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


   int main(){

   scanf("%s", str);
   int n=strlen(str);
   for(int i=n-2; i; i-=2){
char str [222];

if(strncmp(str, str+i/2, i/2)==0){ printf("%d\n" ,i);
return 0;
                                     }
  }
   return 0; }

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> #include <string.h>
      |                    ^
a.cc: In function 'int main()':
a.cc:6:16: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |    scanf("%s", str);
      |                ^~~
      |                std
a.cc:7:10: error: 'strlen' was not declared in this scope
    7 |    int n=strlen(str);
      |          ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h> #include <string.h>
  +++ |+#include <cstring>
    2 | 
a.cc:11:4: error: 'strncmp' was not declared in this scope
   11 | if(strncmp(str, str+i/2, i/2)==0){ printf("%d\n" ,i);
      |    ^~~~~~~
a.cc:11:4: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C

#include<stdio.h>
int n, i, j, flag;
char S[201];
int main(){
  scanf("%s", S);
  while(S[a]){a++;}
  i=(a-1)>>2;
  while(){
    flag=1;
    for(j=0; j<i; j++){
      if(S[j] != S[j+i]){flag=0; break;}
    }
    if(flag){break;}
    i+=2;
  }
  printf("%d\n", i*2);
}


Compiler output:
main.c: In function 'main':
main.c:6:11: error: 'a' undeclared (first use in this function)
    6 |   while(S[a]){a++;}
      |           ^
main.c:6:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:9: error: expected expression before ')' token
    8 |   while(){
      |         ^
Language: C++

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

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


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

#include<cstdio>
#inslude<cstring>
int main(){
  int n,flag;
  char s[210];
  scanf("%s",s);
  n=strlen(s);
  for(int i=-1;i>0;i--){
    flag=1;
    if(i%2==0){
      for(int j=0;j<i/2;j++)
        if(s[j]!=s[j+i/2])
          flag=0;
      if(flag){
        printf("%d\n",i);
        return 0;
      }
    }
  }
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inslude; did you mean #include?
    2 | #inslude<cstring>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:5: error: 'strlen' was not declared in this scope
    7 |   n=strlen(s);
      |     ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<cstdio>
  +++ |+#include <cstring>
    2 | #inslude<cstring>
Language: C++

#include<cstdio>
#inslude<cstring>
int main(){
  int n,flag;
  char s[210];
  scanf("%s",s);
  n=strlen(s);
  for(int i=-1;i>0;i--){
    flag=1;
    if(i%2==0){
      for(int j=0;j<i/2;j++)
        if(s[j]!=s[j+i/2])
          flag=0;
      if(flag){
        printf("%d\n",I);
        return 0;
      }
    }
  }
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inslude; did you mean #include?
    2 | #inslude<cstring>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:5: error: 'strlen' was not declared in this scope
    7 |   n=strlen(s);
      |     ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<cstdio>
  +++ |+#include <cstring>
    2 | #inslude<cstring>
a.cc:15:23: error: 'I' was not declared in this scope
   15 |         printf("%d\n",I);
      |                       ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
  string s;
  cin>>s;
  for(int i=s.size();i>0;i--){
    string t=s.substr(0,i);
    reverse(t.begin(),t.end());
    if(t.size%2==0 && s==t){
      cout<<t.size()<<endl;
      return 0;
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11: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 '()' ?)
   11 |     if(t.size%2==0 && s==t){
      |        ~~^~~~
      |              ()
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	string s;
	cin >> s;
	int ans = 1;
	for (int i = 1; i < s.size(); i++) {
		bool flg = true;
		for (int j = 0; j < i; j++) {
			if (s.at(j) != s.at(j + 1))
				flag = false;
		}
		if (flg) ans = i;
	}

	cout << ans * 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: 'flag' was not declared in this scope; did you mean 'flg'?
   11 |                                 flag = false;
      |                                 ^~~~
      |                                 flg
Language: C++

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

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

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

    cout << Solve() << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int Solve(std::string)':
a.cc:10:66: error: cannot resolve overloaded function 'size' based on conversion to type 'int'
   10 |         if (s.substr(0, i / 2) == s.substr(i / 2, i / 2)) return size;
      |                                                                  ^~~~
Language: C++

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

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

  for(int i=0;i<S.size();i++) {
    /*if(i==0) {
      S.pop_back();
      S.pop_back();
    }
    */
    /*else if(S.size()==2 && (i==0 || S[0]!=S[1])) {
      cout << 1 << endl;
      return 0;
    }*/
    else {
      int m=S.size()/2-i;
      if(S.substr(0,m)==S.substr(m,m)) {
        cout << S.size() << endl;
        return 0;
      }
      else{
        S.pop_back();
        S.pop_back();
      }
    }
  }
}


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

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

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

  for(int i=0;i<S.size();i++) {
    if(i==0) {
      S.pop_back();
      S.pop_back();
    }
    /*else if(S.size()==2 && (i==0 || S[0]!=S[1])) {
      cout << 1 << endl;
      return 0;
    }*/
    else {
      int m=S.size()/2;
      if(S.substr(0,m)==S.substr(m,m)) {
        cout << S.size() << endl;
        return 0;
      }
      else{
        S.pop_buck();
        S.pop_buck();
        break;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_buck'; did you mean 'pop_back'?
   24 |         S.pop_buck();
      |           ^~~~~~~~
      |           pop_back
a.cc:25:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop_buck'; did you mean 'pop_back'?
   25 |         S.pop_buck();
      |           ^~~~~~~~
      |           pop_back
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int c=200;
  for(int i=0;i<s.size()/2-1;i++){
    char a[100],b[100];
    int d=0;
    for(int j=0;j<=i;j++){
      a[j]=s.at(j);
      b[j]=s.at(i+1+j);
      if(a[j]==b[j])
        d++;
    }
    
    if(d==i+1){
      c=min(c,s.size()-(i+1)-(i+1));
    }
  }
  cout<<c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   18 |       c=min(c,s.size()-(i+1)-(i+1));
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:18:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   18 |       c=min(c,s.size()-(i+1)-(i+1));
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281: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:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:18:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   18 |       c=min(c,s.size()-(i+1)-(i+1));
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int c=200;
  for(int i=0;i<s.size()/2-1;i++){
    char a[100],b[100];
    int d=0;
    for(int j=0;j<=i;j++){
      a[j]=s.at(j);
      b[j]=s.at(i+1+j);
      if(a[j]==b[j])
        d++;
    }
    
    if(d==i+1){
      c=min(c,s.size()-(i+1)*2);
    }
  }
  cout<<c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   18 |       c=min(c,s.size()-(i+1)*2);
      |         ~~~^~~~~~~~~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:18:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   18 |       c=min(c,s.size()-(i+1)*2);
      |         ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281: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:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:18:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   18 |       c=min(c,s.size()-(i+1)*2);
      |         ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int c=200;
  for(int i=0;i<s.size()/2-1;i++){
    char a[100],b[100];
    for(int j=0;j<=i;j++){
      a[j]=s.at(j);
      b[j]=s.at(i+1+j);
    }
    if(a==b){
      c=min(c,s.size()-(i+1)*2);
    }
  }
  cout<<c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   14 |       c=min(c,s.size()-(i+1)*2);
      |         ~~~^~~~~~~~~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:14:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   14 |       c=min(c,s.size()-(i+1)*2);
      |         ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281: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:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:14:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   14 |       c=min(c,s.size()-(i+1)*2);
      |         ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include "pch.h"
#include <iostream>
#include<stdio.h>
#include<cstring>

char str[201];
char a[101], b[101];

void shorten(char str[]) {//文字列を2文字分短くする//
	int i,n;

	n = strlen(str);
	   
	str[n - 1] = '\0';
	str[n - 2] = '\n';
 }

void splid(char str[], int x) {//文字列を二つに分ける//

	int i;

	for (i = 0; i < x / 2; i++) {
		a[i] = str[i];
		b[i] = str[x / 2 + i];

	}
	a[x / 2] = '\n';
	b[x / 2] = '\n';
}

int main() {
	int len;

	gets_s(str);

	while (strlen(str) > 0) {
		shorten(str);
		len = strlen(str);
		splid(str, len);
		if (strcmp(a, b) == 0) {
			printf("%d", len-1);
			return 0;
		}
		
	}	

	return 0;
}


Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include<stdio.h>
#include<cstring>

char str[201];
char a[101], b[101];

void shorten(char str[]) {//文字列を2文字分短くする//
	int i,n;

	n = strlen(str);
	   
	str[n - 1] = '\0';
	str[n - 2] = '\n';
 }

void splid(char str[], int x) {//文字列を二つに分ける//

	int i;

	for (i = 0; i < x / 2; i++) {
		a[i] = str[i];
		b[i] = str[x / 2 + i];

	}
	a[x / 2] = '\n';
	b[x / 2] = '\n';
}

int main() {
	int len;

	gets_s(str);

	while (strlen(str) > 0) {
		shorten(str);
		len = strlen(str);
		splid(str, len);
		if (strcmp(a, b) == 0) {
			printf("%d", len-1);
			return 0;
		}
		
	}	

	return 0;
}

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

#include<stdio.h>
#include<cstring>

char str[201];
char a[101], b[101];

void shorten(char str[]) {//文字列を2文字分短くする//
	int i,n;

	n = strlen(str);
	   
	str[n - 1] = '\0';
	str[n - 2] = '\n';
 }

void splid(char str[], int x) {//文字列を二つに分ける//

	int i;

	for (i = 0; i < x / 2; i++) {
		a[i] = str[i];
		b[i] = str[x / 2 + i];

	}
	a[x / 2] = '\n';
	b[x / 2] = '\n';
}

int main() {
	int len;

	gets(str);

	while (strlen(str) > 0) {
		shorten(str);
		len = strlen(str);
		splid(str, len);
		if (strcmp(a, b) == 0) {
			printf("%d", len-1);
			return 0;
		}
		
	}	

	return 0;
}

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

#include<stdio.h>
#include<cstring>

char str[201];
char a[101], b[101];

void shorten(char str[]) {//文字列を2文字分短くする//
	int i,n;

	n = strlen(str);
	   
	str[n - 1] = '\0';
	str[n - 2] = '\n';
 }

void splid(char str[], int x) {//文字列を二つに分ける//

	int i;

	for (i = 0; i < x / 2; i++) {
		a[i] = str[i];
		b[i] = str[x / 2 + i];

	}
	a[x / 2] = '\n';
	b[x / 2] = '\n';
}

int main() {
	int len;

	gets_s(str);

	while (strlen(str) > 0) {
		shorten(str);
		len = strlen(str);
		splid(str, len);
		if (strcmp(a, b) == 0) {
			printf("%d", len-1);
			return 0;
		}
		
	}	

	return 0;
}

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

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

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:47: error: 's' was not declared in this scope
    9 |                         if(n.substr(0,i/2-1)==s.substr(i/2,i)){
      |                                               ^
Language: C++

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

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: expected ')' before ';' token
    7 |         for(int i=n.size()-1;2<=i;i--;){
      |            ~                         ^
      |                                      )
a.cc:7:39: error: expected primary-expression before ')' token
    7 |         for(int i=n.size()-1;2<=i;i--;){
      |                                       ^
Language: C++

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

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sise'; did you mean 'size'?
    7 |         for(int i=n.sise()-1;2<=i;i--;){
      |                     ^~~~
      |                     size
a.cc:7:38: error: expected ')' before ';' token
    7 |         for(int i=n.sise()-1;2<=i;i--;){
      |            ~                         ^
      |                                      )
a.cc:7:39: error: expected primary-expression before ')' token
    7 |         for(int i=n.sise()-1;2<=i;i--;){
      |                                       ^
Language: C++

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

signed main() {
  string s;
  cin >> s;
  bool latte = false;
  latte = true;
  int malta = 0;
  latte = 0119;
  malta = 1333;
  for (int i = 0; i < s.size(); ++i) {
    for(int j = i; j < s.size(); j++) {
    }
    if(malta == 1333) malta = 0;
  }
  for(int luzhiled = 0; luzhiled < s.size(); ++luzhiled) {
    int i = luzhiled;
    int j = luzhiled + luzhiled;
    if (s.substr(0, i) == s.substr(i, j)) malta = i;
    if (s.substr(0, i) == s.substr(i, i)) malta = i;
  } // 4 tab de muzukasii
  cout << malta << endl;
  cerr << "+++ kurumizawa = ukunichia = " << endl;
  return 0;
}

Compiler output:
a.cc:10:11: error: invalid digit "9" in octal constant
   10 |   latte = 0119;
      |           ^~~~
Language: C++

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

signed main() {
  string s;
  cin >> s;
  bool latte = false;
  latte = true;
  int malta = 0;
  latte = 0119;
  malta = 1333;
  for (int i = 0; i < s.size(); ++i) {
    for(int j = i; j < s.size(); j++) {
    }
    if(malta == 1333) malta = 0;
  }
  for(int luzhiled = 0; luzhiled < s.size(); ++luzhiled) {
    int i = luzhiled;
    int j = luzhiled + luzhiled;
    if (s.substr(0, i) == s.substr(i, j)) malta = i;
    if (s.substr(0, i) == s.substr(i, i)) malta = i;
  } // 4 tab de muzukasii
  cout << malta << endl;
  cerr << "+++ kurumizawa = ukunichia = " << endl;
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: bist/stdc++.h: No such file or directory
    1 | #include <bist/stdc++.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 < 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 <iostream>
#include <string>
using namespace std;
int main () {
        char str [222];
        cin >> str;
        int n= strlen (str );
        for (int i=n -2; i; i -=2) {
                if( strncmp (str, str +i/2, i/2) ==0) {
                        cout << i;
                        return 0;
                }
        }
        return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'strlen' was not declared in this scope
    7 |         int n= strlen (str );
      |                ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:9:21: error: 'strncmp' was not declared in this scope
    9 |                 if( strncmp (str, str +i/2, i/2) ==0) {
      |                     ^~~~~~~
a.cc:9:21: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

main(){
  puts("Hello World");
}

Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:3: error: 'puts' was not declared in this scope
    2 |   puts("Hello World");
      |   ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int a;
string s;
map <char,int>

int main(){
    cin>>s;
    s.pop_back();
    if(s.size()%2==1)s.pop_back;
    while(a){
        if(s)
    }
}


Compiler output:
a.cc:7:1: error: two or more data types in declaration of 'main'
    7 | map <char,int>
      | ^~~~~~~~~~~~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
char str[233];

int main() {
while(~scanf("%s", str)) {
int ln = strlen(str);
int res;
for(int i = ln-1; i >= 0; i--) {
if(i & 1) {
bool flg=1;
for(int j = 0, k=(i+1)/2; j <= (i-1)/2, k <= i; j++, k++) {
if(str[i] != str[j]) {
flg=0;
break;
}
}
}
if(!flg) continue;
else {
res = i+1; 
break;
}
}
printf("%d\n", res);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'flg' was not declared in this scope
   23 | if(!flg) continue;
      |     ^~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
char str[233];

int main() {
while(~scanf("%s", str)) {
int ln = strlen(str);
int res;
for(int i = ln-1; i >= 0; i--) {
if(i & 1) {
bool flg=1;
for(int j = 0, k=(i-1)/2 + 1; j <= (i-1)/2, k <= i; j++, k++) {
if(str[i] != str[j] {
flg=0;
break;
}
}
if(!flg) continue;
else { res = i+1; break;}
}
}
printf("%d\n", res);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ')' before '{' token
   17 | if(str[i] != str[j] {
      |   ~                ^~
      |                    )
a.cc:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
char str[233];

int main() {
while(~scanf("%s", str)) {
int ln = strlen(str);
int res;
for(int i = ln-1; i >= 0; i--) {
if(i & 1) {
bool flg=1;
for(int j = 0, k=(i-1)/2 + 1; j <= (i-1)/2, k <= i; j++, k++) {
if(str[i] != str[j] {
flg=0;
break;
}
}
if(!flg) continue;
else { res = i; break;}
}
}
printf("%d\n", i+1);
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ')' before '{' token
   17 | if(str[i] != str[j] {
      |   ~                ^~
      |                    )
a.cc:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^
a.cc:26:16: error: 'i' was not declared in this scope
   26 | printf("%d\n", i+1);
      |                ^
Language: C++

#include <iostream>
#include <vector>
#include <limits>
#include <string>
#include <boost/range/irange.hpp>
#include <boost/range/adaptors.hpp>

using namespace std;
using namespace boost;
using uint = unsigned int;
using ll = long long int;
using ull = unsigned long long int;

bool is_ok(const string & s){
    if (s.size()%2==1)return false; else {
        for (auto &&i: irange(0U, s.size()/2)){
            if (s.at(i)!=s.at(s.size()/2+i))return false;
        }
    }
    return true;
}


int main() {
    string s;
    cin >> s;
    s.pop_back();
    while (!s.empty()){
        if (is_ok(s)){cout << s.size();return 0;} else s.pop_back();
    }
    return 0;
}

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

#include <iostream>
using namespace std;
int main(void){
    int len,i,cnt;
    vector<int> a;
    scanf("%s",a);
    for(i=a.size()/2;--i;){
        cnt=0;
        for(int j=0;j<i;j++)if(a[j]==a[j+i])cnt++;
        if(cnt==i)break;
    }
    printf("%d\n",i*2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> a;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> a;
      |            ^~~
a.cc:6:16: error: 'a' was not declared in this scope
    6 |     scanf("%s",a);
      |                ^
Language: C++

#include<stdio.h>
#include<string.h>
#include<conio.h>
main()
{
	int i,j,k,l,sum=0,count=0;
	char a[200];
	gets(a);
	l=strlen(a)-1;
	for(i=0;i<l/2;i++)
	{
	//	printf("c%dc",l);
		if(l%2==0){
		for(j=0;j<l;j++)
		{
			if(a[i]==a[j])
			{
				count++;
			}
		}
	//	printf("%c=%d\n",a[i],count);
		if(count%2!=0)
		{
			l--;
			count=0;
			i=0;
		}
		else{
			sum=sum+count;
			count=0;
		}
	}
	else {
	l--;i=0;
}
	}
	
	printf("%d",l);
}

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

#include<stdio.h>
#include<string.h>
main()
{
	int i,j,k,l,sum=0,count=0;
	char a[200];
	gets(a);
	l=strlen(a)-1;
	for(i=0;i<l/2;i++)
	{
	//	printf("c%dc",l);
		if(l%2==0){
		for(j=0;j<l;j++)
		{
			if(a[i]==a[j])
			{
				count++;
			}
		}
	//	printf("%c=%d\n",a[i],count);
		if(count%2!=0)
		{
			l--;
			count=0;
			i=0;
		}
		else{
			sum=sum+count;
			count=0;
		}
	}
	else {
	l--;i=0;
}
	}
	
	printf("%d",l);
}

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:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <string.h>
#include <vector>
#include <cstdio>
#include <cmath>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: expected ')' before '{' token
   19 |     if(test==s.substr(0,i-1){
      |       ~                     ^
      |                             )
a.cc:23:3: error: expected primary-expression before '}' token
   23 |   }
      |   ^
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int O = S.length()-1;
        int ans = 1;
        char[] C = S.toCharArray();
        if (O% 2 == 1) {
            O = O - 1;
            ans++;
        }
        lavel:for (int i = 0; i < O/2;i=i+2) {
            for (int j = 0; j < (O-i) / 2; j++) {
                if (C[j] == C[(O-i) / 2 + j]){} else {
                    ans=ans+2;
                    continue lavel;
                }
            }
            break;
        }
        System.out.println(S.length()-ans);
    }
}

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

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

int main()
{
	char s[200];
	cin >> s;
	int len = strlen(s);
	for (int i = len - 2; i; i -= 2) {
		if (strncmp(s, s + i / 2, i / 2) == 0) {
			cout << i << endl;
			return 0;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'strlen' was not declared in this scope
   12 |         int len = strlen(s);
      |                   ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<vector>
  +++ |+#include <cstring>
    6 | using namespace std;
a.cc:14:21: error: 'strncmp' was not declared in this scope
   14 |                 if (strncmp(s, s + i / 2, i / 2) == 0) {
      |                     ^~~~~~~
a.cc:14:21: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main()
{
	char s[200];
	cin >> s;
	int len = strlen(s);
	for (int i = len - 2; i; i -= 2) {
		if (strncmp(s, s + i / 2, i / 2) == 0) {
			cout << i << endl;
			return 0;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'strlen' was not declared in this scope
   11 |         int len = strlen(s);
      |                   ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<vector>
  +++ |+#include <cstring>
    5 | using namespace std;
a.cc:13:21: error: 'strncmp' was not declared in this scope
   13 |                 if (strncmp(s, s + i / 2, i / 2) == 0) {
      |                     ^~~~~~~
a.cc:13:21: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <climits>
#include <string>
#include <stdlib.h>
#include <algorithm>

using namespace std;
 
int ascSort(const void* v1, const void* v2) {
    const int _v1 = *((const int*)v1);
    const int _v2 = *((const int*)v2);
 
    if ( _v1 < _v2 ) {
        return 1;
    } else if ( _v1 > _v2 ) {
        return -1;
    } else {
        return 0;
    }
}

string a[50];

int main(){
	int n,x=0;
	char s[202];
	cin >> s;
	n = strlen(s);
	int i,j;
	for(i=n-2;i>=0;i-=2){
		x=0;
		for(j=0;j<i/2;j++){
			if(s[j]!=s[j+i/2]){
				x=1;
				break;
			}
		}
		if(x==0){
			cout << i << endl;
			break;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'strlen' was not declared in this scope
   28 |         n = strlen(s);
      |             ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 |
Language: C++

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

int main(void) {
  int a, b, c = INT_MAX;
  string n, x, y;
  cin >> n;
  a = size(n);
  for (int i = 1; i < a; i++) {
    b = a - i;
    if ((b % 2) == 0) {
      x = n.substr(0, (b / 2));
      y = n.substr((b / 2), (b / 2));
      if (x.compare(y) == 0) {
        if (i < c)
          c = i;
      }
    }
  }
  cout << a - c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'INT_MAX' was not declared in this scope
    6 |   int a, b, c = INT_MAX;
      |                 ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | #include <string>
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'itn' was not declared in this scope; did you mean 'int'?
   11 |         itn ss = s.size();
      |         ^~~
      |         int
a.cc:12:25: error: 'ss' was not declared in this scope; did you mean 's'?
   12 |         if (s.substr(0, ss/2) == s.substr(ss/2, ss/2)) {
      |                         ^~
      |                         s
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;

static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const ll INF = 1023456789;

#define REP(i,n)	for(int i=0;i<n;++i)
#define REPR(i,n)	for(int i=n-1;i>=0;--i)
#define FOR(i,s,n)	for(int i=s;i<n;++i)
#define FORR(i,s,n)	for(int i=n-1;i>=s;--i)
#define ALL(c)		(c).begin(),(c).end()
#define CLEAR(v)	memset(v,0,sizeof(v))
#define MP(a,b)		make_pair((a),(b))
#define ABS(a)		((a)>0?(a):-(a))
#define F			first
#define S			second

int main(int argc, char **argv) {
	string s;
	cin >> s;
	for (int i = s.length() - 2; i -= 2) {
		bool f = true;
		REP(j, i / 2) f &= (s[j] == s[i / 2 + j]);
		if (f) {
			cout << i << endl;
			break;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:28:44: error: expected ';' before ')' token
   28 |         for (int i = s.length() - 2; i -= 2) {
      |                                            ^
      |                                            ;
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string ALP = "abcdefghijklmnopqrstuvwxyz";
#define PB push_back
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int main(){
  string s;
  cin >> s;
  for(int i=1,i<s.length(),i++){
    string t = s.substr(0, s.length()-i);
    if(t.length()%2==0){
      if(t.substr(0,t.length()/2)== t.substr(t.length()/2,t.length()/2)){
        cout << t.length();
        break;
      }
    }
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected ';' before '<' token
   17 |   for(int i=1,i<s.length(),i++){
      |                ^
      |                ;
a.cc:17:16: error: expected primary-expression before '<' token
a.cc:17:31: error: expected ';' before ')' token
   17 |   for(int i=1,i<s.length(),i++){
      |                               ^
      |                               ;
Language: C++

//abc066_b ss


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

namespace
{
bool Chk( const char *S, const int iNum )
{
int i;
char C;

	for( i = 0; i < iNum; i++ )
	{
		C = S[ i ];
		if( C == '\0' || C != S[ i + iNum ] ) return false;
	}

	return true;
}


}

int main()
{
int i;
int iLen;
char S[ 210 ];

	cin >> S;
	iLen = strlen( S );
	for( i = iLen / 2; i > 0; i-- )
	{
		if( Chk( i ) )
		{
			cout << i * 2 << endl;

			return 0;
		}
	}

	return 0;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:36:26: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   36 |                 if( Chk( i ) )
      |                          ^
      |                          |
      |                          int
a.cc:36:24: error: too few arguments to function 'bool {anonymous}::Chk(const char*, int)'
   36 |                 if( Chk( i ) )
      |                     ~~~^~~~~
a.cc:9:6: note: declared here
    9 | bool Chk( const char *S, const int iNum )
      |      ^~~
Language: C++

//abc066_b ss


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

namespace
{
bool Chk( const char *S, const int iNum )
{
int i;
char C;

	for( i = 0; i < iNum; i++ )
	{
		C = S[ i ];
		if( C == '\0' || C != S[ i + iNum ]; ) return false;
	}

	return true;
}


}

int main()
{
int i;
int iLen;
char S[ 210 ];

	cin >> S;
	iLen = strlen( S );
	for( i = iLen / 2; i > 0; i-- )
	{
		if( Chk( i ) )
		{
			cout << i * 2 << endl;

			return 0;
		}
	}

	return 0;
}






Compiler output:
a.cc: In function 'bool {anonymous}::Chk(const char*, int)':
a.cc:17:54: error: expected primary-expression before ')' token
   17 |                 if( C == '\0' || C != S[ i + iNum ]; ) return false;
      |                                                      ^
a.cc: In function 'int main()':
a.cc:36:26: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   36 |                 if( Chk( i ) )
      |                          ^
      |                          |
      |                          int
a.cc:36:24: error: too few arguments to function 'bool {anonymous}::Chk(const char*, int)'
   36 |                 if( Chk( i ) )
      |                     ~~~^~~~~
a.cc:9:6: note: declared here
    9 | bool Chk( const char *S, const int iNum )
      |      ^~~
Language: C++

include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string S, s;
      |         ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>S;
      |         ^~~
a.cc:7:14: error: 'S' was not declared in this scope
    7 |         cin>>S;
      |              ^
a.cc:10:17: error: 's' was not declared in this scope
   10 |                 s+=S[i];
      |                 ^
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout<<res<<endl;
      |         ^~~~
a.cc:16:20: error: 'endl' was not declared in this scope
   16 |         cout<<res<<endl;
      |                    ^~~~
Language: C

#include<stdio.h>
int main()
{
    char s;
    scanf("%e",&s);
      /* 文字数をカウント */
  for(i=0; moji[i]!='\0'; ++i);
 i = i-2
  /* 文字数を出力 */
  printf("%d\n",i);

    // 出力
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0; moji[i]!='\0'; ++i);
      |       ^
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:12: error: 'moji' undeclared (first use in this function)
    7 |   for(i=0; moji[i]!='\0'; ++i);
      |            ^~~~
main.c:8:9: error: expected ';' before 'printf'
    8 |  i = i-2
      |         ^
      |         ;
    9 |   /* 文字数を出力 */
   10 |   printf("%d\n",i);
      |   ~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
    string s;
    cin >> s;
    if(s.length() % 2 == 1) s.insert(-1,"a");
    while(1){
        int ans, i=0;
        s.erase(s.end()-1);
        if(s.substr(0,s.length()/2) == s.substr(s.length()/2)){
            ans = s.length() / 2;
            break;
        }
        i++;
    }
    cout << &ans << endl;
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     cout << &ans << endl;
      |              ^~~
      |              abs
Language: C++

#include <iostream>
#include<sstream>
#include<vector>
#include<iterator>
using namespace std;

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

	string rs(S);
	reverse(rs.begin(), rs.end());

	int ret;
	for(int i=(S.size()%2==0 ? 2 : 1); i<S.size(); i+=2)
	{
		string l, r;
		int length = (S.size() - i) / 2;
		int size = length / 2;
		l = rs.substr(i, length);
		r = rs.substr(i+length, length);

		if(l == r)
		{
			ret = length * 2;
			break;
		}
	}

	cout << ret << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'reverse' was not declared in this scope
   13 |         reverse(rs.begin(), rs.end());
      |         ^~~~~~~
Language: Java

import java.util.*;

import org.apache.tools.ant.taskdefs.Exit;

public class Main {
  public static void main(String[] args) throws Exception {
  Scanner sc = new Scanner(System.in);
  String s = sc.nextLine();

  isOddString(s.substring(0, s.length() - 1));
  }

  public static void isOddString(String s) {
  if (s.length() % 2 != 0) {
    isOddString(s.substring(0, s.length() - 1));
  }
  if (s.substring(0, s.length() / 2).equals(s.substring(s.length() / 2, s.length()))) {
    System.out.println(s.length());
    System.exit(0);
  } else {
    isOddString(s.substring(0, s.length() - 1));
  }
  }
}


Compiler output:
Main.java:3: error: package org.apache.tools.ant.taskdefs does not exist
import org.apache.tools.ant.taskdefs.Exit;
                                    ^
1 error
Language: Java

import java.util.Scanner;

public class Main2 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		String ans;
		String ans2;
		int answer = 0;
		for(int i = 1; i < str.length()+1; i++){
			ans = str.substring(0, str.length()-i);
			if(ans.length() % 2 == 0){
				if(ans.substring(0, ans.length()/2).equals(ans.substring(ans.length()/2, ans.length()))){
					answer = ans.length();
					break;
				}
			}
		}
		System.out.println(answer);

	}

}


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



#include <iostream>
#include <vector>
#include <string>
#include <limits.h>

using namespace std;

int main(void) {
 
    
    string s; cin >> s;
    
    while (true) {
        
        string s1;
        string s2;
        
        s.pop_back();
        
        int size = static_cast<int>(s.size());
        int mid = size / 2;
        
        for (int i = 0; i <= mid; ++i) {
            
            s1.push_back(s[i]);
            
        }
        
        for (int i = mid + 1; i <= size - 1; ++i) {
            
            s2.push_back(s[i]);
            
        }
        
        if (s1 == s2) { break; }
        
    }
    
    cout << s1.size() << endl;
    
    return 0;
    
    
}

















Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: 's1' was not declared in this scope; did you mean 's'?
   41 |     cout << s1.size() << endl;
      |             ^~
      |             s