Language: C++

#include<iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000


int L[MAX/2+2], R[MAX/2+2];
int cnt;


void merge(int A[], int n, int left, int mid, int right){
	int n1 = mid-left;
	int n2 = right-mid;
	for(int i=0;i<n1;i++) L[i] = A[left+i];
	for(int i=0;i<n2;i++) R[i] = A[mid+i];
	L[n1] = R[n2] = SEMTINEL;
	int i=0, j=0;
	forZ(int k=left;k<right;k++){
		cnt++;
		if(L[i]<=R[j]){
			A[k] = L[i++];
		}else{
			A[k] = R[j++];
		}
	}
}


void mergeSort(int A[], int n, int left, int mid, int right){
	if(left+1 < right){
		int mid = (left+rught)/2;
		mergeSort(A, n, left, mid);
		mergeSort(A, n, mid, right);
		merge(A, n, left, right);
	}
}

int main(){`
	int A[MAX], n, i;
	cnt = 0;
	
	cin >> n;
	for(i=0;i<n;i++) cin >> A[i];
	
	mergeSort(A, n, 0, n);
	
	for(i=0;i<n;i++){
		if(i) cout << " ";
		cout << A[i];
	}
	cout << endl;
	
	cout << cnt << endl;
	
	
	reeturn 0;
}

Compiler output:
a.cc:38:12: error: stray '`' in program
   38 | int main(){`
      |            ^
a.cc: In function 'void merge(int*, int, int, int, int)':
a.cc:16:25: error: 'SEMTINEL' was not declared in this scope; did you mean 'SENTINEL'?
   16 |         L[n1] = R[n2] = SEMTINEL;
      |                         ^~~~~~~~
      |                         SENTINEL
a.cc:18:14: error: expected primary-expression before 'int'
   18 |         forZ(int k=left;k<right;k++){
      |              ^~~
a.cc:18:25: error: 'k' was not declared in this scope
   18 |         forZ(int k=left;k<right;k++){
      |                         ^
a.cc: In function 'void mergeSort(int*, int, int, int, int)':
a.cc:31:33: error: 'rught' was not declared in this scope; did you mean 'right'?
   31 |                 int mid = (left+rught)/2;
      |                                 ^~~~~
      |                                 right
a.cc:32:26: error: too few arguments to function 'void mergeSort(int*, int, int, int, int)'
   32 |                 mergeSort(A, n, left, mid);
      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~
a.cc:29:6: note: declared here
   29 | void mergeSort(int A[], int n, int left, int mid, int right){
      |      ^~~~~~~~~
a.cc:33:26: error: too few arguments to function 'void mergeSort(int*, int, int, int, int)'
   33 |                 mergeSort(A, n, mid, right);
      |                 ~~~~~~~~~^~~~~~~~~~~~~~~~~~
a.cc:29:6: note: declared here
   29 | void mergeSort(int A[], int n, int left, int mid, int right){
      |      ^~~~~~~~~
a.cc:34:22: error: too few arguments to function 'void merge(int*, int, int, int, int)'
   34 |                 merge(A, n, left, right);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:11:6: note: declared here
   11 | void merge(int A[], int n, int left, int mid, int right){
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:45:18: error: too few arguments to function 'void mergeSort(int*, int, int, int, int)'
   45 |         mergeSort(A, n, 0, n);
      |         ~~~~~~~~~^~~~~~~~~~~~
a.cc:29:6: note: declared here
   29 | void mergeSort(int A[], int n, int left, int mid, int right){
      |      ^~~~~~~~~
a.cc:56:9: error: 'reeturn' was not declared in this scope
   56 |         reeturn 0;
      |         ^~~~~~~