gondola.cpp:94:11: error: redefinition of 'const int MAX'
const int MAX=5e5;
^~~
gondola.cpp:12:11: note: 'const int MAX' previously defined here
const int MAX=5e5;
^~~
gondola.cpp:96:12: error: redefinition of 'int arr [500000]'
int arr[MAX],fre[MAX];
^
gondola.cpp:14:5: note: 'int arr [500000]' previously declared here
int arr[MAX],fre[MAX];
^~~
gondola.cpp:96:21: error: redefinition of 'int fre [500000]'
int arr[MAX],fre[MAX];
^
gondola.cpp:14:14: note: 'int fre [500000]' previously declared here
int arr[MAX],fre[MAX];
^~~
gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:146:5: error: redefinition of 'int replacement(int, int*, int*)'
int replacement(int n, int gondolaSeq[], int replacementSeq[])
^~~~~~~~~~~
gondola.cpp:64:5: note: 'int replacement(int, int*, int*)' previously defined here
int replacement(int n, int gondolaSeq[], int replacementSeq[])
^~~~~~~~~~~
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:153:5: error: redefinition of 'int countReplacement(int, int*)'
int countReplacement(int n, int inputSeq[])
^~~~~~~~~~~~~~~~
gondola.cpp:71:5: note: 'int countReplacement(int, int*)' previously defined here
int countReplacement(int n, int inputSeq[])
^~~~~~~~~~~~~~~~