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

#include <iostream>
#include <bits/stdc++.h>
 
using namespace std;
 
 
int main() {
  
   string s;
  cin>>s;
  
  if(s.length()==2)
       cout<<s;
  
  else
  {
    reverse(s.begin(),s.end())
         cout<<s;
            }
            
    	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: expected ';' before 'cout'
   17 |     reverse(s.begin(),s.end())
      |                               ^
      |                               ;
   18 |          cout<<s;
      |          ~~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;


int main() {
  
   string s;
  cin>>s;
  
  if(s.length()==2)
       cout<<s;
  
  else
  {
    reverse(s.begin((),s.end())
         cout<<s;
            }
            
    	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected primary-expression before ')' token
   17 |     reverse(s.begin((),s.end())
      |                      ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
  string s;cin >> s;
  if(s.size()==2) cout << s << endl;
  else{
    reverse(s.begin(),s.end());
    cout << s << endl;
}


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

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

int main() {
  int a;
  
  cin >> a;
  
  if(a.length() == 2){
    cout << a << endl;
  } else {
    std::reverse(a.begin(),a.end());
    cout << a << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: request for member 'length' in 'a', which is of non-class type 'int'
    9 |   if(a.length() == 2){
      |        ^~~~~~
a.cc:12:20: error: request for member 'begin' in 'a', which is of non-class type 'int'
   12 |     std::reverse(a.begin(),a.end());
      |                    ^~~~~
a.cc:12:30: error: request for member 'end' in 'a', which is of non-class type 'int'
   12 |     std::reverse(a.begin(),a.end());
      |                              ^~~
Language: C++

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

int main() {
  int s;
  cin >> s;
  if((int)s.length()==3){
	for(int i=2;i>=0;i--){
      cout << s.at(i);
    }
    cout << endl;
  }
  else{
    cout << s << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: request for member 'length' in 's', which is of non-class type 'int'
    7 |   if((int)s.length()==3){
      |             ^~~~~~
a.cc:9:17: error: request for member 'at' in 's', which is of non-class type 'int'
    9 |       cout << s.at(i);
      |                 ^~
Language: C++

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

int main() {
  int s;
  cin >> s;
  if(s.size()==3){
	for(int i=2;i>=0;i--){
      cout << s.at(i);
    }
    cout << endl;
  }
  else{
    cout << s << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'size' in 's', which is of non-class type 'int'
    7 |   if(s.size()==3){
      |        ^~~~
a.cc:9:17: error: request for member 'at' in 's', which is of non-class type 'int'
    9 |       cout << s.at(i);
      |                 ^~
Language: C

#include<iostream>
#include<string>

using namespace std;

int main() {
	string s;
	cin >> s;
	if (s.size() == 2)cout << s << endl;
	else cout << s[2] << s[1] << s[0] << endl;
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main () {
  string;
  cin >> S;
  if(S.size() == 3)cout << S.at(2) << S.at(1) << S.at(0) << endl;
  else cout << S << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: declaration does not declare anything [-fpermissive]
    4 |   string;
      |   ^~~~~~
a.cc:5:10: error: 'S' was not declared in this scope
    5 |   cin >> S;
      |          ^
Language: C++

#include <iostream>
#include <string>
using namespace std;int main(){string s;cin>>s;if(s.size()==2)cout<<s<<endl;else{cout<<s.at(2)<<s.at(1)<<s.at(0)<<endl;return 0;}
                               

Compiler output:
a.cc: In function 'int main()':
a.cc:3:130: error: expected '}' at end of input
    3 | using namespace std;int main(){string s;cin>>s;if(s.size()==2)cout<<s<<endl;else{cout<<s.at(2)<<s.at(1)<<s.at(0)<<endl;return 0;}
      |                               ~                                                                                                  ^
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  string s;cin>>s;
  if(s.size()==2)cout s;
  else rep(i, 3)cout<<s[2-i];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before 's'
   10 |   if(s.size()==2)cout s;
      |                      ^~
      |                      ;
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
    char s[10];
    sacnf("%s",s);
    if(strlen(s)==2){printf("%s",s);}
    else{s[0]=s[4];s[0]=s[2];s[2]=s[4];printf("%c%c%c",s[0],s[1],s[2]);}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |     sacnf("%s",s);
      |     ^~~~~
      |     scanf
Language: C++

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

int main(){
  string s;
  cin >> s;
  if(s.size()==2) cout << s << endl;
  else{
    reverese(s.begin(),s.end());
    cout << s << endl;
  }
}

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

#include <cstdio>

int main()
{
  char s[4];
  scanf("%s" s);
  if (s[2])
  {
    printf("%c%c%c\n", s[2], s[1], s[0]);
  }
  else
  {
    puts(s);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ')' before 's'
    6 |   scanf("%s" s);
      |        ~    ^~
      |             )
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <unordered_map>

using namespace std;
using ll = long long;

void _cin(){} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail){ cin >> head; _cin(forward<Tail>(tail)...); }
void _cout(){ cout << "\n"; } template <class Head, class... Tail> void _cout(Head&& head, Tail&&... tail){ cout << head; _cout(forward<Tail>(tail)...); }
int gcd(int a, int b){ return (b == 0) ? a : gcd(b, a % b); }

#define Sq(x) (x)*(x)
#define For(i, n) for(int i = 0; i < (n); i ++)
#define Rep(n) For(_, n)
#define Range(c) c.begin(), c.end()
#define RevRange(c) c.rbegin(), c.rend()
#define Contains(c, x) (find(Range(c), x) != c.end())
#define Search(rb, re, x) distance(rb, find(rb, re, x))
#define Sort(a) sort(Range(a))
#define DeSort(a) sort(RevRange(a))
#define Reverse(c) reverse(Range(c))
#define Unique(a) a.erase(unique(Range(a)), a.end())
#define Cusum(T, xs, sxs) vector<T> sxs(xs.size()+1); For(i, (int)xs.size()) sxs[i+1] = sxs[i] + xs[i]
#define Cin(T, ...) T __VA_ARGS__; _cin(__VA_ARGS__)
#define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
#define Cins2(T, n, xs, ys) vector<T> xs(n), ys(n); For(i, n) cin >> xs[i] >> ys[i]
#define Cins3(T, n, xs, ys, zs) vector<T> xs(n), ys(n), zs(n); For(i, n) cin >> xs[i] >> ys[i] >> zs[i]
#define Cinss(T, n, m, xs) Vec2(T, n, m, xs); For(i, n) For(j, m) cin >> xs[i][j]
#define Cinm(T, n, map) unordered_map<T, int> map; Rep(n){ Cin(T, x); map[x] ++; }
#define Cout(...) _cout(__VA_ARGS__)
#define Couts(xs) { for(const auto &e : xs) cout << e << " "; cout << "\n"; }
#define Coutyn(cond) Cout((cond) ? "yes" : "no")
#define CoutYn(cond) Cout((cond) ? "Yes" : "No")
#define CoutYN(cond) Cout((cond) ? "YES" : "NO")
#define vc vector
#define Mini(a, x) a = min(a, x)
#define Maxi(a, x) a = max(a, x)

// constexpr int MOD = 1e9+7;

int main(void){
    Cins(string, s);
    if(s.size() == 3) Reverse(s);
    Cout(s);
}





Compiler output:
a.cc:46:19: error: macro "Cins" requires 3 arguments, but only 2 given
   46 |     Cins(string, s);
      |                   ^
a.cc:29:9: note: macro "Cins" defined here
   29 | #define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
      |         ^~~~
a.cc: In function 'int main()':
a.cc:46:5: error: 'Cins' was not declared in this scope
   46 |     Cins(string, s);
      |     ^~~~
a.cc:47:8: error: 's' was not declared in this scope
   47 |     if(s.size() == 3) Reverse(s);
      |        ^
a.cc:48:10: error: 's' was not declared in this scope
   48 |     Cout(s);
      |          ^
a.cc:34:25: note: in definition of macro 'Cout'
   34 | #define Cout(...) _cout(__VA_ARGS__)
      |                         ^~~~~~~~~~~
Language: C++

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

int main(){
    int n,c,r=0,l=0,ans=0;
    string a;
    cin>>a;
    if(a.length==3){
        cout<<a[2]<<a[1]<<a[0];
    }
    else{
        cout<<a;
    }
} 

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

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()

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

    // start
    string s;
    cin >> s;
    cout << (s.size(2) ? s : reverse(all(s))) << endl;
    // end

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: no matching function for call to 'std::__cxx11::basic_string<char>::size(int)'
   15 |     cout << (s.size(2) ? s : reverse(all(s))) << endl;
      |              ~~~~~~^~~
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:1076:7: note: candidate: '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]'
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/basic_string.h:1076:7: note:   candidate expects 0 arguments, 1 provided
Language: C++

#include<stdio.h>
#include<string.h>
main()
{
    char a[3];
    scanf("%s",a);
        if(strlen(a)==2){
            printf("%s\n",a);
        }
        else{
            printf("%s\n",strrev(a));
        }
}


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:11:27: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
   11 |             printf("%s\n",strrev(a));
      |                           ^~~~~~
      |                           strsep
Language: C++

#include<stdio.h>
#include<string.h>
main()
{
    char a[4];
    while(scanf("%s",&a)==1){
        if(strlen(a)==2){
            printf("%s\n",a);
        }
        else
            printf("%s\n",strrev(a));
    }
}


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:11:27: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
   11 |             printf("%s\n",strrev(a));
      |                           ^~~~~~
      |                           strsep
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,0,n)
#define SORT(V) sort((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  int S;
  cin>>S;
  
  if(S.size()==2) cout<<S;
  else cout<<S.at(2)<<S.at(1)<<S.at(0)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:8: error: request for member 'size' in 'S', which is of non-class type 'int'
   22 |   if(S.size()==2) cout<<S;
      |        ^~~~
a.cc:23:16: error: request for member 'at' in 'S', which is of non-class type 'int'
   23 |   else cout<<S.at(2)<<S.at(1)<<S.at(0)<<endl;
      |                ^~
a.cc:23:25: error: request for member 'at' in 'S', which is of non-class type 'int'
   23 |   else cout<<S.at(2)<<S.at(1)<<S.at(0)<<endl;
      |                         ^~
a.cc:23:34: error: request for member 'at' in 'S', which is of non-class type 'int'
   23 |   else cout<<S.at(2)<<S.at(1)<<S.at(0)<<endl;
      |                                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define uli unsigned long long int
#define INF 999999999
#define rep(i,m,n) for(int i = m;i < n;i++)
#define pb(n) push_back(n)
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define NeOut(S) cout << S
#define HpOut(S) cout << setprecision(20) << S << endl;
#define Vecpr vector<pair<lli,lli>>
#define mod 1000000007;
bool is_prime(lli x) {
  for(lli i = 2; i * i <= x; i++) {
    if(x % i == 0) return false;
  }
  return true;
}
int main() {
  lli A,B,C=0,D=0,E=0,F=0,G=0,H=0,N,M;
  string S;
  A=S.size;
  if(A==2)Out(S);
  else cout << S[2] << S[1] << S[0]<< endl;
}

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

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>

using namespace std;

#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define FORIN(i, a, b) for (int i = a; i < (int)b; i++)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define DEBUG(...) debug(__LINE__, ":" __VA_ARGS__)

using Pi = pair<int, int>;
using ll = long long;
const int INF = 1 << 28;

string to_string(string s) {
  return s;
}

template <class T>
string to_string(vector<T> v) {
  string ret = "{";
  for (int i = 0; i < v.size() - 1; ++i) {
    ret += to_string(v[i]) + ",";
  }
  if (v.size() > 0) {
    ret += to_string(v.back());
  }
  ret += "}";
  return ret;
}

void debug() {
  cerr << endl;
}

template <class Head, class... Tail>
void debug(Head head, Tail... tail) {
  cerr << to_string(head) << " ";
  debug(tail...);
}

void print() {
  cout << endl;
}

template <class Head, class... Tail>
void print(Head head, Tail... tail) {
  cout << to_string(head);
  print(tail...);
}

void get() {}

template <class Head, class... Tail>
void get(Head& head, Tail&... tail) {
  cin >> head;
  get(tail...);
}

template <class T>
void getv(vector<T>& vec) {
  for (int i = 0; i < vec.size(); ++i)
    cin >> vec[i];
}

int main() {
  string S;
  get(S);
  if (S.size == 3)
    reverse(ALL(S));
  print(S);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:81:9: 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 '()' ?)
   81 |   if (S.size == 3)
      |       ~~^~~~
      |             ()
Language: C++

#include<iostream>
main(){
  string s;
  std::cin>>s;
  if((int)s.size()==2)std::cout<<s<<std::endl;
  else{
    std::cout<<s[2]<<s[1]<<s[0]<<std::endl;
  }
}


Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:13: error: 's' was not declared in this scope
    4 |   std::cin>>s;
      |             ^
Language: C++

#include<iostream>
main(){
  string s;
  std::cin>>s;
  if((int)s.size()==2)std::cout<<s<<std::endl;
  else{
    ctd::cout<<s[2]<<s[1]<<s[0]<<std::endl;
  }
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:13: error: 's' was not declared in this scope
    4 |   std::cin>>s;
      |             ^
a.cc:7:5: error: 'ctd' has not been declared
    7 |     ctd::cout<<s[2]<<s[1]<<s[0]<<std::endl;
      |     ^~~
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  char a[4];
  scanf("%s",a);
  if(strlen(a)==2)printf("%s",a);
  else for(int i=2,i,i--)printf("%c",a[i]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: redeclaration of 'i' with no linkage
    7 |   else for(int i=2,i,i--)printf("%c",a[i]);
      |                    ^
main.c:7:16: note: previous definition of 'i' with type 'int'
    7 |   else for(int i=2,i,i--)printf("%c",a[i]);
      |                ^
main.c:7:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '--' token
    7 |   else for(int i=2,i,i--)printf("%c",a[i]);
      |                       ^~
main.c:8:3: error: expected expression before 'return'
    8 |   return 0;
      |   ^~~~~~
main.c:9:1: error: expected expression before '}' token
    9 | }
      | ^
main.c:9:1: error: expected expression before '}' token
Language: C++

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

# define REP(i,n) for (int i=0;i<(n);++i)
# define rep(i,a,b) for(int i=a;i<(b);++i)
# define p(s) std::cout << s ;
# define pl(s)  std::cout << s << endl;
# define printIf(j,s1,s2) cout << (j ? s1 : s2) << endl;
# define YES(j) cout << (j ? "YES" : "NO") << endl;
# define Yes(j) std::cout << (j ? "Yes" : "No") << endl;
# define yes(j) std::cout << (j ? "yes" : "no") << endl;
# define all(v) v.begin(),v.end()
# define showVector(v) REP(i,v.size()){p(v[i]);p(" ")} pl("")
template<class T> inline bool chmin(T &a, T b){ if(a > b) { a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b){ if(a < b) { a = b; return true;} return false;}
typedef long long int ll;
typedef pair<ll,ll> P_ii;
typedef pair<double,double> P_dd;

template<class T>
vector<T> make_vec(size_t a){
    return vector<T>(a);
}

template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}

template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){
  for(auto &e:t) fill_v(e,v);
}


const int MOD = 1000000007;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;

void addM(long long &a, long long b) {
    a += b;
    if (a >= MOD) a -= MOD;
}

void mulM(long long &a, long long b) {
    a = ((a%MOD)*(b%MOD))%MOD ;
}

// a^b mod M
long myPow(long a,long b,int M) {
    long ret = 1;
    long tmp = a;
    while(b>0) {
        if((b&1)==1) ret = (ret * tmp) % M;
        tmp = (tmp * tmp) % M;
        b = b>>1;
    }
    return ret;
}

 // nCk mod M
int nCk(int n,int k,int M) {
    long ret = 1;
    int mi = min(k, n-k);
    for(int i=1;i<=mi;i++) {
        ret = (ret * myPow(i,M-2,M)) % M;
    }
    for(int i=n-mi+1;i<=n;i++) {
        ret = (ret * i) % M;
    }
    return (int)ret;
};

vector<pair<long long, long long> > prime_factorize(long long n) {
    vector<pair<long long, long long> > res;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) { ++num; n /= p; }
        res.push_back(make_pair(p, num));
    }
    if (n != 1) res.push_back(make_pair(n, 1));
    return res;
}


int main() {
    string s;
    cin >> N;

    if(s.size()==2) {
        pl(s)
    } else {
        reverse(s.begin(),s.end());
        pl(s)
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:12: error: 'N' was not declared in this scope
   94 |     cin >> N;
      |            ^
Language: C

#include<stdio.h>
int main(){
  char S[4];
  if(scanf("%s",S)==2){
  	print("%s",S);
  }else{
  	printf("%c%c%c",S[2],S[1],S[0]);
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    5 |         print("%s",S);
      |         ^~~~~
      |         printf
Language: C++

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

#define REP(i,a,n) for(int i=a;i<n;++i)
#define REPL(i,a,n) for(ll i=a;i<n;++i)
#define RUP(a,b) ((a+b-1)/(b))
#define ENT "\n"
#define SORTVG(v) sort(v.begin(),v.end(),greater<>())
#define SORTV(v) sort(v.begin(),v.end())
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define INF LLONG_MAX/2
#define int long long

typedef long long ll;
typedef pair<int,int> Pii;
typedef vector<int> Vi;

template<class T> void chmax(T& a, T b) {if(a < b){a=b;}}
template<class T> void chmin(T& a, T b) {if(a > b){a=b;}}
template<class T> void YesNo(T& a) {if(a){cout << "Yes" << ENT;}else{cout << "No" << ENT;}}
template<class T> void YESNO(T& a) {if(a){cout << "YES" << ENT;}else{cout << "NO" << ENT;}}
template<class T> void AorB(T& a, string A,string B) {if(a){cout << A << ENT;}else{cout << B << ENT;}}

int atcoder(){
    string s;
    cin>>s;
    if(s.length==3){
    	reverse(ALL(s));
    }
    cout<<s<<ENT;
    return 0;
}

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    atcoder();
    return 0;
}


Compiler output:
a.cc: In function 'long long int atcoder()':
a.cc:28:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   28 |     if(s.length==3){
      |        ~~^~~~~~
      |                ()
Language: Java

import java.util.Scanner;

public class exe_4 {
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		String a = sc.next();
		String[] b = a.split("");
		
		int c=a.length();
		
		if(c==3){
			String str=b[0];
			b[0]=b[2];
			b[2]=str;
		}
		
		for(int i=0;i<c;i++){		
			System.out.print(b[i]);
		} 
	}

}


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

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

int main() {
    char s[4];
    scanf("%s", s);
    int n = strlen(s);
    if (n == 2) {
        printf("%s\n", s);
    }
    else if (n == 3) {
        for (int i = n - 1; i >= 0; --i) {
            printf("%c", s[i]);
        }
        printf("\n");
    }
    return 0;
}


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

#include<iostream>
using namespace std;
int main(){
int a,b,k;
cin>>a>>b>>k;

for(int i=0; i<k; i++){
if((i+2)%==0){
if(a%2==0){
a-=1;
a/=2;
b+=a;
}
else{
a/=2;
b+=a;
}
}
else{
if(b%2==0){
b-=1;
b/=2;
a+=b;
}
else{
b/=2;
a+=b;
}
}
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before '=' token
    8 | if((i+2)%==0){
      |           ^
Language: C++

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

int main() {
    string s; cin >> s;
    switch(s.size()) {
        case 2:
            cout << s << endl;
            return 0;
        case 3:
            reverse(s.begin(), s.end());
            cout << s << endl;
            return 0;
    }
}

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

#include <bits/stdc++.h>

using namespace std;

int main() {
string s;
cin >> s;
if(s.length()==3) reverse(s.begin(), s.end())
cout << s << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:46: error: expected ';' before 'cout'
    8 | if(s.length()==3) reverse(s.begin(), s.end())
      |                                              ^
      |                                              ;
    9 | cout << s << endl;
      | ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  if(s.size()==2)
    cout << s << endl;
  else{
    string x=s[0];
    s[0]=s[2];
    s[2]=x;
    cout << s << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |     string x=s[0];
      |                 ^
a.cc:11:10: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   11 |     s[2]=x;
      |          ^
      |          |
      |          std::string {aka std::__cxx11::basic_string<char>}
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		if (S.length() == 2)
			System.out.println(S);
		else
			System.out.println(S.charAt(2)+S.charAt(1)+S.charAt(0));
	}
}	


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
  	cin>>s;
  	cout<<(s.size()==2?s:s[2]s[1]s[0])<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: operands to '?:' have different types 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    6 |         cout<<(s.size()==2?s:s[2]s[1]s[0])<<endl;
a.cc:6:34: error: expected ')' before 's'
    6 |         cout<<(s.size()==2?s:s[2]s[1]s[0])<<endl;
      |               ~                  ^
      |                                  )
Language: C++

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

int main() {
    int s;
    cin >> s;
    if (s.size() == 2) {
        cout << s << endl;
    } else {
        cout << s[2] << s[1] << s[0] << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: request for member 'size' in 's', which is of non-class type 'int'
    7 |     if (s.size() == 2) {
      |           ^~~~
a.cc:10:18: error: invalid types 'int[int]' for array subscript
   10 |         cout << s[2] << s[1] << s[0] << endl;
      |                  ^
a.cc:10:26: error: invalid types 'int[int]' for array subscript
   10 |         cout << s[2] << s[1] << s[0] << endl;
      |                          ^
a.cc:10:34: error: invalid types 'int[int]' for array subscript
   10 |         cout << s[2] << s[1] << s[0] << endl;
      |                                  ^
Language: C++

,>,>,>+<
----------
[++++++++++.<.<.>>>[-]<[-]]
>[<<<.>.[-]]

Compiler output:
a.cc:1:1: error: expected unqualified-id before ',' token
    1 | ,>,>,>+<
      | ^
a.cc:1:2: error: expected unqualified-id before '>' token
    1 | ,>,>,>+<
      |  ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <math.h>
#include <set>
#define ALL(obj) (obj).begin(),(obj).end()
#define RALL(obj) (obj).rbegin(),(obj).rend()
#define P pair<int, int>
 
#define MOD 1000000007
#define INF 2147483647
#define NINF (-2147483647-1)
#define LLINF 9223372036854775807
using ll = long long;
using namespace std; 
 
int main() {
    string S;
    cin >> S;
    if ((int)S.length == 2) {
        cout << S << endl;
    }
    else {
        cout << S[2] << S[1] << S[0] << endl;
    }
    getchar(); getchar();
    return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <math.h>
#include <set>
#define ALL(obj) (obj).begin(),(obj).end()
#define RALL(obj) (obj).rbegin(),(obj).rend()
#define P pair<int, int>

#define MOD 1000000007
#define INF 2147483647
#define NINF (-2147483647-1)
#define LLINF 9223372036854775807
using ll = long long;
using namespace std; 

int main() {
    string S;
    cin >> S;
    if (S.length == 2) {
        cout << S << endl;
    }
    else {
        cout << S[2] << S[1] << S[0] << endl;
    }
    getchar(); getchar();
    return 0;
}

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

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

int main(){
  string s; cin >> s;
  if(s.size() == 3) reverse(s.begin(), s.end());
  
  cout << s << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'reverse' was not declared in this scope
    7 |   if(s.size() == 3) reverse(s.begin(), s.end());
      |                     ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  string s;
  cin >> s;
  if(s.size() == 2) cout << s << "\n";
  else{
    reverse(s.begin(), s.end());
    cout << s << "\n";
  }
}

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

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

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

  if(s.size()==2)cout<<s<<endl;
  else cout<<s[2]<<s[1]<<s[0]<<endl;
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: expected '}' at end of input
    9 |   else cout<<s[2]<<s[1]<<s[0]<<endl;
      |                                     ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
string s;
string slove(){
  if(s.size()==2)return s;
  reverse(s.begin(),s.end());
  return s;
}
int main(){
  cin>>s;
  cout<<slove()<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'std::string slove()':
a.cc:7:3: error: 'reverse' was not declared in this scope
    7 |   reverse(s.begin(),s.end());
      |   ^~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
string s;
string slove(){
  if(s.size()==2)return s;
  s.reverse(s.begin(),s.end());
  return s;
}
int main(){
  cin>>s;
  cout<<slove()<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'std::string slove()':
a.cc:7:5: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    7 |   s.reverse(s.begin(),s.end());
      |     ^~~~~~~
      |     reserve
Language: C++

#include <iostream>
#include <string>
using namespace std;
string s;
string slove(){
  if(s.size==2)return s;
  s.reverse(s.begin(),s.end());
  return s;
}
int main(){
  cin>>s;
  cout<<slove()<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'std::string slove()':
a.cc:6:8: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |   if(s.size==2)return s;
      |      ~~^~~~
      |            ()
a.cc:7:5: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
    7 |   s.reverse(s.begin(),s.end());
      |     ^~~~~~~
      |     reserve
Language: C++

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

int main () {
  string a ;
  cin >> a ;
  
  if(a.size()==3) cout << a[2] << a[1] << a[0] << endl ;
  if(a.size()==2} cout << a[0] << a[1] << endl ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ')' before '}' token
    9 |   if(a.size()==2} cout << a[0] << a[1] << endl ;
      |     ~           ^
      |                 )
a.cc:9:17: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:9:19: error: 'cout' does not name a type
    9 |   if(a.size()==2} cout << a[0] << a[1] << endl ;
      |                   ^~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <cmath>
#include <map>

int main(void) {
	std::string s;

	std::cin >> s;

	if (s.length() == 3) {
		std::cout << s[2] << s[1] << s[0] << sdt::endl;
	}
	else {
		std::cout << s << std::endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:54: error: 'sdt' has not been declared
   15 |                 std::cout << s[2] << s[1] << s[0] << sdt::endl;
      |                                                      ^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	string s;
  	cin >> s;
  	if(s.size() == 3) reverse(s.begin(), s.end());
  	cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: 'reverse' was not declared in this scope
    7 |         if(s.size() == 3) reverse(s.begin(), s.end());
      |                           ^~~~~~~
Language: Java

public class Main {

    public static void main(String[] args) {
 
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String res = s;
        if(s.length() == 3) {
            byte[] a = s.getBytes();
            byte[] r = new byte[]{a[2],a[1],a[0]};
            res = new String(r);

        }

        System.out.println(res);
    }
}

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

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

using namespace std;

int main(){
  string a;
  cin >> a;
  size_t aa = a.length();
  if(aa > 2){
    reverse(a.begin(), a.end());
    cout << a << endl;
  }
  else{
    cout << a << endl;
  }
  return 0;
}

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

#include <iostream>
#include <strstream>
#include <string>
#include <deque>
#include <vector>
typedef unsigned int UINT;
using namespace std;

bool isRevers(const string & str)
{
    if (str.length() > 2)
        return true;
    return false;
}
string & makeStrRevers(string & str)
{
    reverse(str.begin(), str.end());
    return str;
}

int main(void) {
    string S;
    cin >> S;
    if (isRevers(S))
        cout << makeStrRevers(S) << endl;
    else
        cout << S << endl;
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/backward/strstream:50,
                 from a.cc:2:
/usr/include/c++/14/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
   32 | #warning \
      |  ^~~~~~~
a.cc: In function 'std::string& makeStrRevers(std::string&)':
a.cc:17:5: error: 'reverse' was not declared in this scope
   17 |     reverse(str.begin(), str.end());
      |     ^~~~~~~
Language: C++

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

int main()｛
    string s; cin >> s;
    
    if(s.size()==2) cout << s << endl;
    else｛
        for(int i=2;0<=i;i--) cout << s[i];
        cout << endl;
    ｝
    
    return 0;
｝

Compiler output:
a.cc:4:11: error: expected initializer before '\U0000ff5b'
    4 | int main()｛
      |           ^~
a.cc:5:15: error: 'cin' does not name a type
    5 |     string s; cin >> s;
      |               ^~~
a.cc:7:5: error: expected unqualified-id before 'if'
    7 |     if(s.size()==2) cout << s << endl;
      |     ^~
a.cc:8:5: error: 'else\U0000ff5b' does not name a type
    8 |     else｛
      |     ^~~~~~
a.cc:9:21: error: expected unqualified-id before numeric constant
    9 |         for(int i=2;0<=i;i--) cout << s[i];
      |                     ^
a.cc:9:26: error: 'i' does not name a type
    9 |         for(int i=2;0<=i;i--) cout << s[i];
      |                          ^
a.cc:10:9: error: 'cout' does not name a type
   10 |         cout << endl;
      |         ^~~~
a.cc:11:5: error: '\U0000ff5d' does not name a type
   11 |     ｝
      |     ^~
a.cc:14:1: error: '\U0000ff5d' does not name a type
   14 | ｝
      | ^~
Language: C++

#include<bits/stdc++.h>

int main()｛
    string s; cin >> s;
    
    if(s.size()==2) cout << s << endl;
    else｛
        for(int i=2;0<=i;i--) cout << s[i];
        cout << endl;
    ｝
    
    return 0;
｝

Compiler output:
a.cc:3:11: error: expected initializer before '\U0000ff5b'
    3 | int main()｛
      |           ^~
a.cc:4:15: error: 'cin' does not name a type
    4 |     string s; cin >> s;
      |               ^~~
a.cc:6:5: error: expected unqualified-id before 'if'
    6 |     if(s.size()==2) cout << s << endl;
      |     ^~
a.cc:7:5: error: 'else\U0000ff5b' does not name a type
    7 |     else｛
      |     ^~~~~~
a.cc:8:21: error: expected unqualified-id before numeric constant
    8 |         for(int i=2;0<=i;i--) cout << s[i];
      |                     ^
a.cc:8:26: error: 'i' does not name a type
    8 |         for(int i=2;0<=i;i--) cout << s[i];
      |                          ^
a.cc:9:9: error: 'cout' does not name a type
    9 |         cout << endl;
      |         ^~~~
a.cc:10:5: error: '\U0000ff5d' does not name a type
   10 |     ｝
      |     ^~
a.cc:13:1: error: '\U0000ff5d' does not name a type
   13 | ｝
      | ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)

using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

int main() {
	int A, B, K;
    cin>>A>>B>>K;
	int C=A+B;
	int t=0;
	if(t==K){
		count << A <<" "<< B <<endl;
	}
	else{
	if (t%2==0){
		A%=2;
		B=C-A;
		t++;
	} 
	else {
		B%=2;
		A=C-B;
		t++;
	}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   15 |                 count << A <<" "<< B <<endl;
      |                 ~~~~~~^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)

using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
	string S;
    cin>>S;
	if(S.length()==2) cout << S<<“\n”;
	else cout <<S[2]<<S[1]<<S[0]<<“\n”; 
}


Compiler output:
a.cc:14:38: error: extended character “ is not valid in an identifier
   14 |         if(S.length()==2) cout << S<<“\n”;
      |                                      ^
a.cc:14:39: error: stray '\' in program
   14 |         if(S.length()==2) cout << S<<“\n”;
      |                                       ^
a.cc:14:40: error: extended character ” is not valid in an identifier
   14 |         if(S.length()==2) cout << S<<“\n”;
      |                                        ^
a.cc:15:39: error: extended character “ is not valid in an identifier
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“\n”;
      |                                       ^
a.cc:15:40: error: stray '\' in program
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“\n”;
      |                                        ^
a.cc:15:41: error: extended character ” is not valid in an identifier
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“\n”;
      |                                         ^
a.cc: In function 'int main()':
a.cc:14:38: error: '\U0000201c' was not declared in this scope
   14 |         if(S.length()==2) cout << S<<“\n”;
      |                                      ^
a.cc:15:39: error: '\U0000201c' was not declared in this scope
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“\n”;
      |                                       ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)

using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
	string S;
    cin>>S;
	if(S.length()==2) cout << S<<“¥n”;
	else cout <<S[2]<<S[1]<<S[0]<<“¥n”; 
}

Compiler output:
a.cc:14:38: error: extended character “ is not valid in an identifier
   14 |         if(S.length()==2) cout << S<<“¥n”;
      |                                      ^
a.cc:14:38: error: extended character ¥ is not valid in an identifier
a.cc:14:38: error: extended character ” is not valid in an identifier
a.cc:15:39: error: extended character “ is not valid in an identifier
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“¥n”;
      |                                       ^
a.cc:15:39: error: extended character ¥ is not valid in an identifier
a.cc:15:39: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:14:38: error: '\U0000201c\U000000a5n\U0000201d' was not declared in this scope
   14 |         if(S.length()==2) cout << S<<“¥n”;
      |                                      ^~~~
a.cc:15:39: error: '\U0000201c\U000000a5n\U0000201d' was not declared in this scope
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“¥n”;
      |                                       ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)

using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
	string S;
    cin>>S;
	if(S.length()==2) cout << S<<“|n”;
	else cout <<S[2]<<S[1]<<S[0]<<“|n”; 
}

Compiler output:
a.cc:14:38: error: extended character “ is not valid in an identifier
   14 |         if(S.length()==2) cout << S<<“|n”;
      |                                      ^
a.cc:14:40: error: extended character ” is not valid in an identifier
   14 |         if(S.length()==2) cout << S<<“|n”;
      |                                        ^
a.cc:15:39: error: extended character “ is not valid in an identifier
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“|n”;
      |                                       ^
a.cc:15:41: error: extended character ” is not valid in an identifier
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“|n”;
      |                                         ^
a.cc: In function 'int main()':
a.cc:14:38: error: '\U0000201c' was not declared in this scope
   14 |         if(S.length()==2) cout << S<<“|n”;
      |                                      ^
a.cc:14:40: error: 'n\U0000201d' was not declared in this scope
   14 |         if(S.length()==2) cout << S<<“|n”;
      |                                        ^~
a.cc:15:39: error: '\U0000201c' was not declared in this scope
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“|n”;
      |                                       ^
a.cc:15:41: error: 'n\U0000201d' was not declared in this scope
   15 |         else cout <<S[2]<<S[1]<<S[0]<<“|n”;
      |                                         ^~
Language: C++

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

#define FOR(i,r,n) for(int i = (int)(r);i < (int)(n);i++)
#define rep(i,n) FOR(i,0,n)


int main(){
    int A,B,K;

    scanf("%d %d %d",&A,&B,&K);

    rep(i,K - 1){
        if(A % 2){
            A -= 1;
        }
        B += A/2;
        A -= A/2;
        if(B % 2){
            B -= 1;
        }
        A+=B/2;
        B-=B/2;
    }
    printf("%d %d\n",A,B);

    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: expected '}' at end of input
   30 |     return 0;
      |              ^
a.cc:11:11: note: to match this '{'
   11 | int main(){
      |           ^