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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:79:19: error: expected ';' before '>' token
   79 |   for(ll k=(a-2),k>0,k+=2){
      |                   ^
      |                   ;
a.cc:79:19: error: expected primary-expression before '>' token
a.cc:79:26: error: expected ';' before ')' token
   79 |   for(ll k=(a-2),k>0,k+=2){
      |                          ^
      |                          ;
a.cc:83:16: error: expected ';' before '}' token
   83 |           break
      |                ^
      |                ;
   84 |       }
      |       ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:79:19: error: expected ';' before '>' token
   79 |   for(ll k=(a-2),k>0,i+=2){
      |                   ^
      |                   ;
a.cc:79:19: error: expected primary-expression before '>' token
a.cc:79:22: error: 'i' was not declared in this scope
   79 |   for(ll k=(a-2),k>0,i+=2){
      |                      ^
a.cc:79:26: error: expected ';' before ')' token
   79 |   for(ll k=(a-2),k>0,i+=2){
      |                          ^
      |                          ;
a.cc:83:16: error: expected ';' before '}' token
   83 |           break
      |                ^
      |                ;
   84 |       }
      |       ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:79:19: error: expected ';' before '>' token
   79 |   for(ll k=(a-2),k>0,i+=2){
      |                   ^
      |                   ;
a.cc:79:19: error: expected primary-expression before '>' token
a.cc:79:22: error: 'i' was not declared in this scope
   79 |   for(ll k=(a-2),k>0,i+=2){
      |                      ^
a.cc:79:26: error: expected ';' before ')' token
   79 |   for(ll k=(a-2),k>0,i+=2){
      |                          ^
      |                          ;
a.cc:83:16: error: expected ';' before 'b'
   83 |           break
      |                ^
      |                ;
   84 |           b=false
      |           ~     
a.cc:84:11: error: 'b' was not declared in this scope
   84 |           b=false
      |           ^
Language: C++

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

int main(){
string S;
  cin>>S;
  for(int i=0;i<S.size();i++){
    S.pop_back();
    if(S.size()%2==0){
    for(int j=0;j<S.size()/2;j++){
    if(S.at(j)!=S.at(S.size()/2+j)){
       break;
    }
    if(j==S.size()/2-1){
    cout<<S.size()<<endl;
    }
      if(S.size()==0){
cout<<0<<endl;
       }
       }
       }
       }


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

#include<iostream>
using namespace std;

int main() {
  string S;
  cin >> S;
  int A = S.size() / 2;
  for(int i = 0;i < A / 2;i++) {
    S.push_back();
    S.push_back();
    bool B = true;
    for(int j = 0;j < S.size();j++) {
      if(S.at(j) != S.at(S.size() / 2 + j) {
        B = false;
        break;
      }
    }
    if(B == true) {
      cout << S.size() << endl;
      break;
    }
  }         
}     


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
    9 |     S.push_back();
      |     ~~~~~~~~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:10:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
   10 |     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:13:43: error: expected ')' before '{' token
   13 |       if(S.at(j) != S.at(S.size() / 2 + j) {
      |         ~                                 ^~
      |                                           )
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#include<iostream>
using namespace std;

int main() {
  string S;
  cin >> S;
  int A = S.size() / 2;
  for(int i = 0;i < C / 2;i++) {
    S.push_back();
    S.push_back();
    bool B = true;
    for(int j = 0;j < S.size();j++) {
      if(S.at(j) != S.at(S.size() / 2 + j) {
        B = false;
        break;
      }
    }
    if(B == true) {
      cout << S.size() << endl;
      break;
    }
  }         
}     

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'C' was not declared in this scope
    8 |   for(int i = 0;i < C / 2;i++) {
      |                     ^
a.cc:9:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
    9 |     S.push_back();
      |     ~~~~~~~~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:10:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::push_back()'
   10 |     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:13:43: error: expected ')' before '{' token
   13 |       if(S.at(j) != S.at(S.size() / 2 + j) {
      |         ~                                 ^~
      |                                           )
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

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

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

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(S.size%2==0){
      |        ~~^~~~
      |              ()
a.cc:13:35: error: expected ')' before '{' token
   13 |     if(S.at(j)!=S.at(S.size()/2+j){
      |       ~                           ^
      |                                   )
a.cc:19:8: error: expected primary-expression before '}' token
   19 |        }
      |        ^
Language: C++

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

int main(){
string S;
  cin>>S;
  int count=0;
  for(int i=0;i<S.size();i++){
    A.pop_back();
    count++;
    if(S.size%2==0){
    for(int j=0;j<S.size()/2;j++){
    if(S.at(j)!=S.at(S.size()/2+j){
       break;
    }
    if(j==S.size()/2-1){
    cout<<count<<endl;
    }
       }
       }
       }
       }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'A' was not declared in this scope
    9 |     A.pop_back();
      |     ^
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(S.size%2==0){
      |        ~~^~~~
      |              ()
a.cc:13:35: error: expected ')' before '{' token
   13 |     if(S.at(j)!=S.at(S.size()/2+j){
      |       ~                           ^
      |                                   )
a.cc:19:8: error: expected primary-expression before '}' token
   19 |        }
      |        ^
Language: C++

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

using namespace std;

char s[222];

int main(){
  cin >> s;
  int n = strlen(s);
  for(int i = n - 2; i >= 0; 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:11: error: 'strlen' was not declared in this scope
   11 |   int n = strlen(s);
      |           ^~~~~~
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:13:8: error: 'strncmp' was not declared in this scope
   13 |     if(strncmp(s, s + i / 2, i / 2) == 0){
      |        ^~~~~~~
a.cc:13:8: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<string>

using namespace std;

char s[222];

int main(){
  cin >> s;
  int n = strlen(s);
  for(int i = n - 2; i >= 0; 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:10:11: error: 'strlen' was not declared in this scope
   10 |   int n = strlen(s);
      |           ^~~~~~
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:12:8: error: 'strncmp' was not declared in this scope
   12 |     if(strncmp(s, s + i / 2, i / 2) == 0){
      |        ^~~~~~~
a.cc:12:8: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <string>
#include <iomanip>
#include <ios>
using namespace std;
int check(string s){
  int n = s.length();
  string s_back = s.substr(n / 2,n / 2);
  string s_front = s - s_back;
  
  if(s_front == s_back)
    return 1;
  else
    return 0;
}
 
int main(void){
  string word;
  cin >> word;
  
  while(1){
    int word_length = word.length();
    word = word.substr(0,word_length - 1);
    if(check(word)){
      cout << word.length() << endl;
      break;
    }
  }

Compiler output:
a.cc: In function 'int check(std::string)':
a.cc:9:22: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
    9 |   string s_front = s - s_back;
      |                    ~ ^ ~~~~~~
      |                    |   |
      |                    |   basic_string<[...]>
      |                    basic_string<[...]>
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:9:24: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
    9 |   string s_front = s - s_back;
      |                        ^~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:9:24: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
    9 |   string s_front = s - s_back;
      |                        ^~~~~~
a.cc: In function 'int main()':
a.cc:28:4: error: expected '}' at end of input
   28 |   }
      |    ^
a.cc:17:15: note: to match this '{'
   17 | int main(void){
      |               ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
using namespace std;
int main() {
 string s;
  cin >> s;
  for(int i=2; i<s.length(); i+=2) {
    if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) {
      break;
    }
       }
       cout << s.length()-i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:65: error: expected ')' before '{' token
   10 |     if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) {
      |       ~                                                         ^~
      |                                                                 )
a.cc:13:8: error: expected primary-expression before '}' token
   13 |        }
      |        ^
a.cc:14:27: error: 'i' was not declared in this scope
   14 |        cout << s.length()-i << endl;
      |                           ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
using namespace std;
int main() {
 string s;
  cin >> s;
  for(int i=2; i<S.length(); i+=2) {
    if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) {
      break;
    }
       }
       cout << s.length()-i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'S' was not declared in this scope
    9 |   for(int i=2; i<S.length(); i+=2) {
      |                  ^
a.cc:10:65: error: expected ')' before '{' token
   10 |     if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()) {
      |       ~                                                         ^~
      |                                                                 )
a.cc:13:8: error: expected primary-expression before '}' token
   13 |        }
      |        ^
a.cc:14:27: error: 'i' was not declared in this scope
   14 |        cout << s.length()-i << endl;
      |                           ^
Language: C++

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

int main() {
  string s, t;
  cin >> s;
  
  int check = 0;
  while(check != 0){
    check = 0;
    
    for(int i = 0; i < s.size() - 2; i++){
      t.at(i) = s.at(i);
    }
    
    for(i = 0; i < t.size() / 2; i++){
      if(t.at(i) != t.at((t.size() / 2) + i)){
        check++;
      }
    }
    
    if(check == 0){
      break;
    }
    
    s = t;
  }
  
  cout << t.size() << endl;
}


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

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

#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, m, n) for(int i=m; i<n; i++)

#define INF 2e9
#define ll long long

int main(){
    char str[222];
    cin>>str;
    int n=strlen(str);
    for(int i=n-2; i; i-=2){
        if(strncom(str, str+i/2, i/2)==0){
            cout<<i<<endl;
            return 0;
        }
    }
    return 0;
}

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

#include <iostream>
#include <cstdio>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
const long long INF = 1e9 + 7;
using namespace std;
map<int, int> mp;
int main()
{
	char s[222];
	cin >> s;
	int n = strlen(s);
	for (int i = n - 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:23:17: error: 'strlen' was not declared in this scope
   23 |         int n = strlen(s);
      |                 ^~~~~~
a.cc:16:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   15 | #include <set>
  +++ |+#include <cstring>
   16 | const long long INF = 1e9 + 7;
a.cc:25:21: error: 'strncmp' was not declared in this scope
   25 |                 if (strncmp(s, s + i / 2, i / 2) == 0) {
      |                     ^~~~~~~
a.cc:25:21: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main(){
  string str;
  cin >> str;
  int x;
  for (int i=1;i<str.size()- 1;i+=2){
    for (int j=0;j<=i;j++){
  if(str.at(j) == str.at((i+1)/2+j){
    x=i+1;
  }
     }
     }
     cout << x;
     }
    //0123

Compiler output:
a.cc: In function 'int main()':
a.cc:10:36: error: expected ')' before '{' token
   10 |   if(str.at(j) == str.at((i+1)/2+j){
      |     ~                              ^
      |                                    )
a.cc:13:6: error: expected primary-expression before '}' token
   13 |      }
      |      ^
Language: C++

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

int main(){
  string str;
  cin >> str;
  int x;
  for (int i=1;i<str.size()- 1;i+=2){
    for (int j=0;j<str.size()/2;j++){
  if(str.at(j) == str.at(str.size()/2+j-1){
    x=i+1;
  }
     }
     }
     cout << x;
     }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:43: error: expected ')' before '{' token
   10 |   if(str.at(j) == str.at(str.size()/2+j-1){
      |     ~                                     ^
      |                                           )
a.cc:13:6: error: expected primary-expression before '}' token
   13 |      }
      |      ^
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int point = str.length()-1;
        while(point > 0) {
            String s = str.substring(0,point);
            point--;
            if(s.length()%2!=0) continue;
            if(s.substring(0,s.length()/2).equals(s.substring(s.length()/2))) {
                System.out.println(s.length);
                return;
            }
        }
        System.out.println(0);
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
                System.out.println(s.length);
                                    ^
  symbol:   variable length
  location: variable s of type String
1 error
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;
int main(void)
{
    char s[300];

    cin >> s;

    int t;
    int ans;
    int count = 0;
    for (int i = strlen(s)-2; i > 0; i-=2) {
        if (strncmp(s, s+i/2, i/2) == 0) {
            cout << i << endl;
            return 0;
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 'strlen' was not declared in this scope
   15 |     for (int i = strlen(s)-2; i > 0; i-=2) {
      |                  ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | 
a.cc:16:13: error: 'strncmp' was not declared in this scope
   16 |         if (strncmp(s, s+i/2, i/2) == 0) {
      |             ^~~~~~~
a.cc:16:13: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}

bool even(S)
{
  int N = S.size();
  if (S.substr(0, N / 2 - 1) == S.substr(N / 2, N - 1))
    return true;
  return false;
}

int main()
{
  string S;
  cin >> S;
  int N = S.size();
  
  for (int i = 0; i < N; i++)
  {
    S.erase(S.end());
    if (even(S)) break;
  }
  
  cout << S << endl;
}

Compiler output:
a.cc:14:11: error: 'S' was not declared in this scope
   14 | bool even(S)
      |           ^
a.cc: In function 'int main()':
a.cc:31:13: error: 'even' cannot be used as a function
   31 |     if (even(S)) break;
      |         ~~~~^~~
Language: C++

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

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


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

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

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


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

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

#define int long long
#define INF 1e18

signed main () {
    char s[400]; cin >> s;
    int n = strlen(s);
    for(int i = n - 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:15:13: error: 'strlen' was not declared in this scope
   15 |     int n = strlen(s);
      |             ^~~~~~
a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cstdio>
  +++ |+#include <cstring>
    8 | using namespace std;
a.cc:17:12: error: 'strncmp' was not declared in this scope
   17 |         if(strncmp(s, s + i / 2, i / 2) == 0) {
      |            ^~~~~~~
a.cc:17:12: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

#define int long long
#define INF 1e18

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


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

#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <ctype.h>
#include <map>
#include <vector>
#include <stdlib.h>
#include <cctype>
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define REP1(j,n) for(int j=0;j<(int)n;++j)
#define REPD(i,n) for(int i=n;i>=0;--i)
#define REPD1(j,n) for(int j=n;j=>0;--j)
#define REPS(i,n) for(int i=1;i<=(int)n;++i)
#define REPS1(j,n) for(int j=1;j<=(int)n;++j)
#define rep(i,a,n) for(int i=a;i<=(int)n;++i)
#define SZ(x) ((int)(x).size())	//size() unsigned -> int
#define DescSort(a) sort(a.begin(),a.end(),std::greater<int>())

using namespace std;
typedef long long ll;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:20: error: 'strlen' was not declared in this scope
   26 |         int size = strlen(x);
      |                    ^~~~~~
a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include <cctype>
  +++ |+#include <cstring>
   10 | #define REP(i,n) for(int i=0;i<(int)n;++i)
a.cc:28:21: error: 'strncmp' was not declared in this scope
   28 |                 if (strncmp(x, x + i / 2, i / 2) == 0) {
      |                     ^~~~~~~
a.cc:28:21: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main() {
  string s;
  cin >> s;
  int len=s.length()-2;
  while(len>1) {
    if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()/2) {
      cout << len << endl;
      return 0;
    }
       len-=2;
       }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:67: error: expected ';' before '{' token
    9 |     if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()/2) {
      |                                                                   ^~
      |                                                                   ;
a.cc:9:32: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
    9 |     if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()/2) {
      |        ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3755:5: note: declared here
 3755 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:13:14: error: expected ')' before ';' token
   13 |        len-=2;
      |              ^
      |              )
a.cc:9:7: note: to match this '('
    9 |     if(s.substr(0,s.length()/2)==s.substr(s.length(),s.length()/2) {
      |       ^
Language: C++

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

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

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

Compiler output:
a.cc:15:26: error: stray '#' in program
   15 |                 return 0;#include <bits/stdc++.h>
      |                          ^
a.cc: In function 'int main()':
a.cc:14:27: 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 '()' ?)
   14 |                 cout << s.size-2*i;
      |                         ~~^~~~
      |                               ()
a.cc:15:27: error: 'include' was not declared in this scope
   15 |                 return 0;#include <bits/stdc++.h>
      |                           ^~~~~~~
a.cc:15:36: error: 'bits' was not declared in this scope
   15 |                 return 0;#include <bits/stdc++.h>
      |                                    ^~~~
a.cc:15:41: error: 'stdc' was not declared in this scope; did you mean 'std'?
   15 |                 return 0;#include <bits/stdc++.h>
      |                                         ^~~~
      |                                         std
a.cc:16:1: error: expected primary-expression before 'using'
   16 | using namespace std;
      | ^~~~~
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   18 | int main(){
      |         ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
   18 | int main(){
      |         ^~
      |         --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:18:11: error: a function-definition is not allowed here before '{' token
   18 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: 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 '()' ?)
   14 |                 cout << s.size-2*i;
      |                         ~~^~~~
      |                               ()
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected unqualified-id before 'int'
    8 |         for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){
      |                     ^~~
a.cc:8:21: error: expected ';' before 'int'
    8 |         for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){
      |                     ^~~
      |                     ;
a.cc:8:52: error: expected ')' before ';' token
    8 |         for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){
      |            ~                                       ^
      |                                                    )
a.cc:8:53: error: 'i' was not declared in this scope
    8 |         for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){
      |                                                     ^
a.cc:8:58: error: 'j' was not declared in this scope
    8 |         for(int i=0,int j=1;i<s.size()-1,j<s.size();i+=2,j+=2){
      |                                                          ^
Language: C++

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

int main(){
    string s;
    cin >> s;
    for(int i = (int)s.size(); i >= 0; i++)
    {
        string t = s.substr(0, i);
        string p = reverse(t.begin(), t.end());
        if(t == p){
            cout << i << endl;
            break;
        }
    }
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: conversion from 'void' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |         string p = reverse(t.begin(), t.end());
      |                    ~~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
	Scanner scan=new Scanner(System.in);
	String a=scan.next();
	for(int i=1;i!=a.length();i++) {
		String str=a.substring(0,a.length()-i);
		if(str.length()%2==1) {
			continue;
		}
		else {
			String str1=str.substring(0,str.length()/2);
			String str2=str.substring(str.length()/2,str.length());
			if(str1.equals(str2)) {
				System.out.println(str.length());
				return;
			}
		}

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

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

    string s;
    string temp_s;
    cin >> s;

    vector<string> ss;

    for(int i = 0; i < s.length(); i++){
        temp_s = s[i];
        ss.push_back(temp_s);
    }

    int mx = 0;

    for(int i = ss.size(); i > 0; i--){
        if(i % 2 == 0){
            //std::cout << i << "回" << std::endl;
            int j = 0;
            vector<string> sss1;
            vector<string> sss2;
            //max = i;
            for(j = 0; j < i / 2;j++){
                temp_s = ss[j];
                sss1.push_back(temp_s);
                //std::cout << ss[j];
            }
            //std::cout << std::endl;
            for(j = i/2; j < i;j++){
                temp_s = ss[j];
                sss2.push_back(temp_s);
                std::cout << ss[j];
            }
            //std::cout << std::endl;
            //確かめる
            bool flag = true;
            for(j = 0; j < i / 2; j++){
                if(!(sss1[j] == sss2[j])){
                    flag = false;
                }
            }

            if(flag == true){
                //std::cout << "a" << std::endl;
                mx = i;
            }
        }else{

        }

    }

    if(ss.size() == max){
        max = 0;
    }

    std::cout << mx << std::endl;
    

}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:18: error: invalid operands of types 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} and '<unresolved overloaded function type>' to binary 'operator=='
   59 |     if(ss.size() == max){
      |        ~~~~~~~~~~^~~~~~
a.cc:60:15: error: overloaded function with no contextual type information
   60 |         max = 0;
      |               ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

    string s;
    string temp_s;
    cin >> s;

    vector<string> ss;

    for(int i = 0; i < s.length(); i++){
        temp_s = s[i];
        ss.push_back(temp_s);
    }

    int max = 0;

    for(int i = ss.size(); i > 0; i--){
        if(i % 2 == 0){
            //std::cout << i << "回" << std::endl;
            int j = 0;
            vector<string> sss1;
            vector<string> sss2;
            //max = i;
            for(j = 0; j < i / 2;j++){
                temp_s = ss[j];
                sss1.push_back(temp_s);
                //std::cout << ss[j];
            }
            //std::cout << std::endl;
            for(j = i/2; j < i;j++){
                temp_s = ss[j];
                sss2.push_back(temp_s);
                std::cout << ss[j];
            }
            //std::cout << std::endl;
            //確かめる
            bool flag = true;
            for(j = 0; j < i / 2; j++){
                if(!(sss1[j] == sss2[j])){
                    flag = false;
                }
            }

            if(flag == true){
                //std::cout << "a" << std::endl;
                max = i;
            }
        }else{

        }

    }

    if(ss.size() == max){
        max = 0;
    }

    std::cout << max << std::endl;
    

Compiler output:
a.cc: In function 'int main()':
a.cc:63:35: error: expected '}' at end of input
   63 |     std::cout << max << std::endl;
      |                                   ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C

#include<stdio.h>

int main(){
  int len = 0, j, count = 0;
  char s[201];
  
  scanf("%s", s);
  while(s[len]){
    len++;
  }
  
  for (i = len - 2; i >= 0; i -= 2){
    count++;
    s[i] = '\0';
    j = 0;
    while(s[j]){
      if(s[j] != s[j + i/2]){
        break;
      }
    }
    if(i == j){
      printf("%d\n", count);
      return 0;
    }
  }
}

    

Compiler output:
main.c: In function 'main':
main.c:12:8: error: 'i' undeclared (first use in this function)
   12 |   for (i = len - 2; i >= 0; i -= 2){
      |        ^
main.c:12:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

S
S
に対して、条件を満たす 
1
1
文字以上の文字列が存在する。

Compiler output:
a.cc:3:1: error: extended character 、 is not valid in an identifier
    3 | に対して、条件を満たす
      | ^
a.cc:6:1: error: extended character 。 is not valid in an identifier
    6 | 文字以上の文字列が存在する。
      | ^
a.cc:1:1: error: 'S' does not name a type
    1 | S
      | ^
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S =scanner.next();
		int count = 0;

		for (int i = 2; i < S.length(); i += 2) {
			//文字列Sも末尾を、2文字ずつ削除
			String s = S.substring(0, S.length()-i);
			//文字列Sをs1とs2に分割
//			String s1 = s.substring(0, s.length() / 2);
//			String s2 = s.substring(s.length() / 2, s.length());

			System.out.println("s1:" + s1);
			System.out.println("s2:" + s2);

			//文字列s1とs2が等しい場合
			if (s1.equals(s2)) {
				count = s.length();
				break;
			}
		}
		System.out.println(count);
	}

}

Compiler output:
Main.java:17: error: cannot find symbol
			System.out.println("s1:" + s1);
			                           ^
  symbol:   variable s1
  location: class Main
Main.java:18: error: cannot find symbol
			System.out.println("s2:" + s2);
			                           ^
  symbol:   variable s2
  location: class Main
Main.java:21: error: cannot find symbol
			if (s1.equals(s2)) {
			              ^
  symbol:   variable s2
  location: class Main
Main.java:21: error: cannot find symbol
			if (s1.equals(s2)) {
			    ^
  symbol:   variable s1
  location: class Main
4 errors
Language: C++

#include <vector>
#include <queue>
#include <string>
using namespace std;
typedef long long ll;

int main() {
	string s;

	cin >> s;
	s.erase(s.end() - 2, s.end());

	for (int i = 0; s.size() != 0; i++)
	{
		for (int k = 0; k <= s.size()/2; k++)
		{
			if (k == s.size() / 2) {
				cout << s.size() << endl;
				exit(0);
			}

			if (s[k] != s[k + s.size() / 2]) break;
		}
		s.erase(s.end() - 2, s.end());
	}

	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> s;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <string>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout << s.size() << endl;
      |                                 ^~~~
a.cc:18:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:53: error: 'endl' was not declared in this scope
   18 |                                 cout << s.size() << endl;
      |                                                     ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <string>
  +++ |+#include <ostream>
    4 | using namespace std;
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;
    S = S.substr(0, S.size()-1);
    if(S.size() % 2 == 1) S = S.substr(0, S.size()-1);
    
    while(S.substr(0,S.size()/2 != S.substr(S.size()/2,S.size()/2){
        S = S.substr(0,S.size()-2);
    }
    cout << S.size() << endl;

    return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.