Language: C

#include <stdio.h>

#define N 500000

int A[N],R[N],L[N];
int c;
void m#include <stdio.h>

#define N 500000

int A[N],R[N],L[N];
int c;
void merge(int*,int,int,int);
void mergeSort(int*,int,int);

int main(){

  int n,i,j;
  int left,right;

  scanf("%d",&n);
  for(i=0; i<n; i++){
    scanf("%d",&A[i]);
  }

  left = 0;
  right = n;

  mergeSort(A,left,right);

  for(i=0; i<n-1; i++){
    printf("%d ",A[i]);
  }
  printf("%d\n",A[n-1]);

  printf("%d\n",c);

  return 0;
}

void merge(int* A,int left,int mid,int right){

  int n1,n2,i,j,k;

  n1 = mid - left;
  n2 = right - mid;

  for(i=0; i<n1; i++){
    L[i] = A[left+i];
  }

  for(i=0; i<n2; i++){
    R[i] = A[mid+i];
  }
  L[n1] = 100000000;
  R[n2] = 100000000;

  i=0;
  j=0;

  for(k = left; k < right; k++){
    if(L[i] <= R[j]){
      A[k] = L[i];
      i++;
      c++;
    }
    else{
      A[k] = R[j];
      j++;
      c++;
    }
  }

}

void mergeSort(int* A,int left,int right){

  int mid;

  if(left+1 < right){
    mid = (left + right)/2;
    mergeSort(A,left,mid);
    mergeSort(A,mid,right);
    merge(A,left,mid,right);
  }
}erge(int*,int,int,int);
void mergeSort(int*,int,int);

int main(){

  int n,i,j;
  int left,right;

  scanf("%d",&n);
  for(i=0; i<n; i++){
    scanf("%d",&A[i]);
  }

  left = 0;
  right = n;

  mergeSort(A,left,right);

  for(i=0; i<n-1; i++){
    printf("%d ",A[i]);
  }
  printf("%d\n",A[n-1]);

  printf("%d\n",c);

  return 0;
}

void merge(int* A,int left,int mid,int right){

  int n1,n2,i,j,k;

  n1 = mid - left;
  n2 = right - mid;

  for(i=0; i<n1; i++){
    L[i] = A[left+i];
  }

  for(i=0; i<n2; i++){
    R[i] = A[mid+i];
  }
  L[n1] = 100000;
  R[n2] = 100000;

  i=0;
  j=0;

  for(k = left; k < right; k++){
    if(L[i] <= R[j]){
      A[k] = L[i];
      i++;
      c++;
    }
    else{
      A[k] = R[j];
      j++;
      c++;
    }
  }

}

void mergeSort(int* A,int left,int right){

  int mid;

  if(left+1 < right){
    mid = (left + right)/2;
    mergeSort(A,left,mid);
    mergeSort(A,mid,right);
    merge(A,left,mid,right);
  }
}

Compiler output:
main.c:7:7: error: stray '#' in program
    7 | void m#include <stdio.h>
      |       ^
main.c:7:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'include'
    7 | void m#include <stdio.h>
      |        ^~~~~~~
main.c:86:2: warning: data definition has no type or storage class
   86 | }erge(int*,int,int,int);
      |  ^~~~
main.c:86:2: error: type defaults to 'int' in declaration of 'erge' [-Wimplicit-int]
main.c:89:5: error: redefinition of 'main'
   89 | int main(){
      |     ^~~~
main.c:16:5: note: previous definition of 'main' with type 'int()'
   16 | int main(){
      |     ^~~~
main.c:114:6: error: redefinition of 'merge'
  114 | void merge(int* A,int left,int mid,int right){
      |      ^~~~~
main.c:41:6: note: previous definition of 'merge' with type 'void(int *, int,  int,  int)'
   41 | void merge(int* A,int left,int mid,int right){
      |      ^~~~~
main.c:149:6: error: redefinition of 'mergeSort'
  149 | void mergeSort(int* A,int left,int right){
      |      ^~~~~~~~~
main.c:76:6: note: previous definition of 'mergeSort' with type 'void(int *, int,  int)'
   76 | void mergeSort(int* A,int left,int right){
      |      ^~~~~~~~~