Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <tuple>
#include <unordered_map>
#include <list>
#include <numeric>
#include <utility>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <ctime>
#include <cassert>
#include <random>
#define INF 1000000000
#define LINF 9000000000000000000
#define mod  1000000007

#define rep(i,n) for(int i=0;i<int(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,a,b) for(int i=(a);i<int(b);i++)
#define all(x) (x).begin(),x.end()
#define pb push_back
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pi;

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ddx[8]={-1,-1,0,1,1,1,0,-1};
int ddy[8]={0,1,1,1,0,-1,-1,-1};
bool debug=false;

/*---------------------------------------------------*/

int main(){
  string s;
  cin >> s;
  if(s.size() == 3) reverse(all(s));
  cout << s << endl;
  return 0;
}
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <tuple>
#include <unordered_map>
#include <list>
#include <numeric>
#include <utility>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <ctime>
#include <cassert>
#include <random>
#define INF 1000000000
#define LINF 9000000000000000000
#define mod  1000000007

#define rep(i,n) for(int i=0;i<int(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,a,b) for(int i=(a);i<int(b);i++)
#define all(x) (x).begin(),x.end()
#define pb push_back
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pi;

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ddx[8]={-1,-1,0,1,1,1,0,-1};
int ddy[8]={0,1,1,1,0,-1,-1,-1};
bool debug=false;

/*---------------------------------------------------*/

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


Compiler output:
a.cc:100:5: error: redefinition of 'int dx [4]'
  100 | int dx[4]={1,0,-1,0};
      |     ^~
a.cc:43:5: note: 'int dx [4]' previously defined here
   43 | int dx[4]={1,0,-1,0};
      |     ^~
a.cc:101:5: error: redefinition of 'int dy [4]'
  101 | int dy[4]={0,1,0,-1};
      |     ^~
a.cc:44:5: note: 'int dy [4]' previously defined here
   44 | int dy[4]={0,1,0,-1};
      |     ^~
a.cc:102:5: error: redefinition of 'int ddx [8]'
  102 | int ddx[8]={-1,-1,0,1,1,1,0,-1};
      |     ^~~
a.cc:45:5: note: 'int ddx [8]' previously defined here
   45 | int ddx[8]={-1,-1,0,1,1,1,0,-1};
      |     ^~~
a.cc:103:5: error: redefinition of 'int ddy [8]'
  103 | int ddy[8]={0,1,1,1,0,-1,-1,-1};
      |     ^~~
a.cc:46:5: note: 'int ddy [8]' previously defined here
   46 | int ddy[8]={0,1,1,1,0,-1,-1,-1};
      |     ^~~
a.cc:104:6: error: redefinition of 'bool debug'
  104 | bool debug=false;
      |      ^~~~~
a.cc:47:6: note: 'bool debug' previously defined here
   47 | bool debug=false;
      |      ^~~~~
a.cc:108:5: error: redefinition of 'int main()'
  108 | int main(){
      |     ^~~~
a.cc:51:5: note: 'int main()' previously defined here
   51 | int main(){
      |     ^~~~