Language: C

#include<stdio.h>
 
#define LIM 500000
#define INF 1000000001
 
int cnt = 0;
int A[LIM];
int L[LIM], R[LIM];
 
void merge(int A[], int left, int mid, int right) {
    int n1 = mid - left;
    int n2 = right - mid;
    int I, J;
    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] = INF; R[n2] = INF;
    I = 0; J = 0;
    for (int k = left; k < right; k++) {
        if (L[I] <= R[J]) {
            A[k] = L[I];
            I++;
            cnt++;
        }
        else {
            A[k] = R[J];
            J++;
            cnt++;
        }
    }
}
 
void mergeSort(int A[], int left, int right) {
    if (left + 1 == right)return;
    int mid = (left + right) / 2;
    mergeSort(A, left, mid);
    mergeSort(A, mid, right);
    merge(A, left, mid, right);
}
 
int main() {
    int N;
    scanf("%d", &N);
    for (int i = 0; i < N; i++) {
        scanf("%d", &A[i]);
    }
    mergeSort(A, 0, N);
 
    for (int i = 0; i < N; i++) {
        printf("%d", A[i]);
        if (i != N - 1)printf(" ");
    }
    printf("\n");
    printf("%d\n", cnt);
    return 0;
}


Compiler output:
main.c:2:1: error: stray '\302' in program
    2 | <U+00A0>
      | ^~~~~~~~
main.c:5:1: error: stray '\302' in program
    5 | <U+00A0>
      | ^~~~~~~~
main.c:9:1: error: stray '\302' in program
    9 | <U+00A0>
      | ^~~~~~~~
main.c: In function 'merge':
main.c:11:1: error: stray '\302' in program
   11 | <U+00A0><U+00A0><U+00A0><U+00A0>int n1 = mid - left;
      | ^~~~~~~~
main.c:11:2: error: stray '\302' in program
   11 | <U+00A0><U+00A0><U+00A0><U+00A0>int n1 = mid - left;
      |         ^~~~~~~~
main.c:11:3: error: stray '\302' in program
   11 | <U+00A0><U+00A0><U+00A0><U+00A0>int n1 = mid - left;
      |                 ^~~~~~~~
main.c:11:4: error: stray '\302' in program
   11 | <U+00A0><U+00A0><U+00A0><U+00A0>int n1 = mid - left;
      |                         ^~~~~~~~
main.c:12:1: error: stray '\302' in program
   12 | <U+00A0><U+00A0><U+00A0><U+00A0>int n2 = right - mid;
      | ^~~~~~~~
main.c:12:2: error: stray '\302' in program
   12 | <U+00A0><U+00A0><U+00A0><U+00A0>int n2 = right - mid;
      |         ^~~~~~~~
main.c:12:3: error: stray '\302' in program
   12 | <U+00A0><U+00A0><U+00A0><U+00A0>int n2 = right - mid;
      |                 ^~~~~~~~
main.c:12:4: error: stray '\302' in program
   12 | <U+00A0><U+00A0><U+00A0><U+00A0>int n2 = right - mid;
      |                         ^~~~~~~~
main.c:13:1: error: stray '\302' in program
   13 | <U+00A0><U+00A0><U+00A0><U+00A0>int I, J;
      | ^~~~~~~~
main.c:13:2: error: stray '\302' in program
   13 | <U+00A0><U+00A0><U+00A0><U+00A0>int I, J;
      |         ^~~~~~~~
main.c:13:3: error: stray '\302' in program
   13 | <U+00A0><U+00A0><U+00A0><U+00A0>int I, J;
      |                 ^~~~~~~~
main.c:13:4: error: stray '\302' in program
   13 | <U+00A0><U+00A0><U+00A0><U+00A0>int I, J;
      |                         ^~~~~~~~
main.c:14:1: error: stray '\302' in program
   14 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n1; i++) {
      | ^~~~~~~~
main.c:14:2: error: stray '\302' in program
   14 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n1; i++) {
      |         ^~~~~~~~
main.c:14:3: error: stray '\302' in program
   14 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n1; i++) {
      |                 ^~~~~~~~
main.c:14:4: error: stray '\302' in program
   14 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n1; i++) {
      |                         ^~~~~~~~
main.c:15:1: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      | ^~~~~~~~
main.c:15:2: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |         ^~~~~~~~
main.c:15:3: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |                 ^~~~~~~~
main.c:15:4: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |                         ^~~~~~~~
main.c:15:5: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |                                 ^~~~~~~~
main.c:15:6: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |                                         ^~~~~~~~
main.c:15:7: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |                                                 ^~~~~~~~
main.c:15:8: error: stray '\302' in program
   15 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>L[i] = A[left + i];
      |                                                         ^~~~~~~~
main.c:16:1: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      | ^~~~~~~~
main.c:16:2: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      |         ^~~~~~~~
main.c:16:3: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      |                 ^~~~~~~~
main.c:16:4: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      |                         ^~~~~~~~
main.c:17:1: error: stray '\302' in program
   17 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n2; i++) {
      | ^~~~~~~~
main.c:17:2: error: stray '\302' in program
   17 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n2; i++) {
      |         ^~~~~~~~
main.c:17:3: error: stray '\302' in program
   17 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n2; i++) {
      |                 ^~~~~~~~
main.c:17:4: error: stray '\302' in program
   17 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int i = 0; i < n2; i++) {
      |                         ^~~~~~~~
main.c:18:1: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      | ^~~~~~~~
main.c:18:2: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |         ^~~~~~~~
main.c:18:3: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |                 ^~~~~~~~
main.c:18:4: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |                         ^~~~~~~~
main.c:18:5: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |                                 ^~~~~~~~
main.c:18:6: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |                                         ^~~~~~~~
main.c:18:7: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |                                                 ^~~~~~~~
main.c:18:8: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>R[i] = A[mid + i];
      |                                                         ^~~~~~~~
main.c:19:1: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      | ^~~~~~~~
main.c:19:2: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      |         ^~~~~~~~
main.c:19:3: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      |                 ^~~~~~~~
main.c:19:4: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>}
      |                         ^~~~~~~~
main.c:20:1: error: stray '\302' in program
   20 | <U+00A0><U+00A0><U+00A0><U+00A0>L[n1] = INF; R[n2] = INF;
      | ^~~~~~~~
main.c:20:2: error: stray '\302' in program
   20 | <U+00A0><U+00A0><U+00A0><U+00A0>L[n1] = INF; R[n2] = INF;
      |         ^~~~~~~~
main.c:20:3: error: stray '\302' in program
   20 | <U+00A0><U+00A0><U+00A0><U+00A0>L[n1] = INF; R[n2] = INF;
      |                 ^~~~~~~~
main.c:20:4: error: stray '\302' in program
   20 | <U+00A0><U+00A0><U+00A0><U+00A0>L[n1] = INF; R[n2] = INF;
      |                         ^~~~~~~~
main.c:21:1: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>I = 0; J = 0;
      | ^~~~~~~~
main.c:21:2: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>I = 0; J = 0;
      |         ^~~~~~~~
main.c:21:3: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>I = 0; J = 0;
      |                 ^~~~~~~~
main.c:21:4: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>I = 0; J = 0;
      |                         ^~~~~~~~
main.c:22:1: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int k = left; k < right; k++) {
      | ^~~~~~~~
main.c:22:2: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int k = left; k < right; k++) {
      |         ^~~~~~~~
main.c:22:3: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int k = left; k < right; k++) {
      |                 ^~~~~~~~
main.c:22:4: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (int k = left; k < right; k++) {
      |                         ^~~~~~~~
main.c:23:1: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      | ^~~~~~~~
main.c:23:2: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |         ^~~~~~~~
main.c:23:3: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |                 ^~~~~~~~
main.c:23:4: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |                         ^~~~~~~~
main.c:23:5: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |                                 ^~~~~~~~
main.c:23:6: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |                                         ^~~~~~~~
main.c:23:7: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |                                                 ^~~~~~~~
main.c:23:8: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>if (L[I] <= R[J]) {
      |                                                         ^~~~~~~~
main.c:24:1: error: stray '\302' in program
   24 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>A[k] = L[I];
      | ^~~~~~~~
main.c:24:2: error: stray '\302' in program
   24 | <U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0><U+00A0>A[k] = L[I];