Language: C

#include <stdio.h>
#include <stdlib.h>
int in()
{
    int n = 0, c = getchar_unlocked();
    do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0');
    return n;
}
 
int dt[100002];
 
int cmp(int *a, int *b) { return *b - *a; }
 
int main()
{
    int n, k, i, t0, t1, t2, s;
 
    n = in(), k = in();
    if (k >= n) { printf("%d\n", n); return 0; }
 
    n--, t0 = t1 = in();
    for (i = 0; i < n; i++)  t2 = in(), dt[i] = t2-t1-1, t1 = t2;
    if (k == 1) { printf("%d\n", t2-t0+1); return 0; }
 
    qsort(dt, n, sizeof(int), cmp);
 
    s = 0, k--;
    for (i = 0; k--; i++) s += dt[i];
    printf("%d\n", t2-t0+1-s);
    return 0;
}


Compiler output:
main.c: In function 'in':
main.c:5:1: error: stray '\302' in program
    5 | <U+00A0><U+00A0><U+00A0><U+00A0>int n = 0, c = getchar_unlocked();
      | ^~~~~~~~
main.c:5:2: error: stray '\302' in program
    5 | <U+00A0><U+00A0><U+00A0><U+00A0>int n = 0, c = getchar_unlocked();
      |         ^~~~~~~~
main.c:5:3: error: stray '\302' in program
    5 | <U+00A0><U+00A0><U+00A0><U+00A0>int n = 0, c = getchar_unlocked();
      |                 ^~~~~~~~
main.c:5:4: error: stray '\302' in program
    5 | <U+00A0><U+00A0><U+00A0><U+00A0>int n = 0, c = getchar_unlocked();
      |                         ^~~~~~~~
main.c:6:1: error: stray '\302' in program
    6 | <U+00A0><U+00A0><U+00A0><U+00A0>do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0');
      | ^~~~~~~~
main.c:6:2: error: stray '\302' in program
    6 | <U+00A0><U+00A0><U+00A0><U+00A0>do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0');
      |         ^~~~~~~~
main.c:6:3: error: stray '\302' in program
    6 | <U+00A0><U+00A0><U+00A0><U+00A0>do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0');
      |                 ^~~~~~~~
main.c:6:4: error: stray '\302' in program
    6 | <U+00A0><U+00A0><U+00A0><U+00A0>do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0');
      |                         ^~~~~~~~
main.c:7:1: error: stray '\302' in program
    7 | <U+00A0><U+00A0><U+00A0><U+00A0>return n;
      | ^~~~~~~~
main.c:7:2: error: stray '\302' in program
    7 | <U+00A0><U+00A0><U+00A0><U+00A0>return n;
      |         ^~~~~~~~
main.c:7:3: error: stray '\302' in program
    7 | <U+00A0><U+00A0><U+00A0><U+00A0>return n;
      |                 ^~~~~~~~
main.c:7:4: error: stray '\302' in program
    7 | <U+00A0><U+00A0><U+00A0><U+00A0>return n;
      |                         ^~~~~~~~
main.c: At top level:
main.c:9:1: error: stray '\302' in program
    9 | <U+00A0>
      | ^~~~~~~~
main.c:11:1: error: stray '\302' in program
   11 | <U+00A0>
      | ^~~~~~~~
main.c:13:1: error: stray '\302' in program
   13 | <U+00A0>
      | ^~~~~~~~
main.c: In function 'main':
main.c:16:1: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>int n, k, i, t0, t1, t2, s;
      | ^~~~~~~~
main.c:16:2: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>int n, k, i, t0, t1, t2, s;
      |         ^~~~~~~~
main.c:16:3: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>int n, k, i, t0, t1, t2, s;
      |                 ^~~~~~~~
main.c:16:4: error: stray '\302' in program
   16 | <U+00A0><U+00A0><U+00A0><U+00A0>int n, k, i, t0, t1, t2, s;
      |                         ^~~~~~~~
main.c:17:1: error: stray '\302' in program
   17 | <U+00A0>
      | ^~~~~~~~
main.c:18:1: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0>n = in(), k = in();
      | ^~~~~~~~
main.c:18:2: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0>n = in(), k = in();
      |         ^~~~~~~~
main.c:18:3: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0>n = in(), k = in();
      |                 ^~~~~~~~
main.c:18:4: error: stray '\302' in program
   18 | <U+00A0><U+00A0><U+00A0><U+00A0>n = in(), k = in();
      |                         ^~~~~~~~
main.c:19:1: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k >= n) { printf("%d\n", n); return 0; }
      | ^~~~~~~~
main.c:19:2: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k >= n) { printf("%d\n", n); return 0; }
      |         ^~~~~~~~
main.c:19:3: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k >= n) { printf("%d\n", n); return 0; }
      |                 ^~~~~~~~
main.c:19:4: error: stray '\302' in program
   19 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k >= n) { printf("%d\n", n); return 0; }
      |                         ^~~~~~~~
main.c:20:1: error: stray '\302' in program
   20 | <U+00A0>
      | ^~~~~~~~
main.c:21:1: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>n--, t0 = t1 = in();
      | ^~~~~~~~
main.c:21:2: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>n--, t0 = t1 = in();
      |         ^~~~~~~~
main.c:21:3: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>n--, t0 = t1 = in();
      |                 ^~~~~~~~
main.c:21:4: error: stray '\302' in program
   21 | <U+00A0><U+00A0><U+00A0><U+00A0>n--, t0 = t1 = in();
      |                         ^~~~~~~~
main.c:22:1: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; i < n; i++)<U+00A0> t2 = in(), dt[i] = t2-t1-1, t1 = t2;
      | ^~~~~~~~
main.c:22:2: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; i < n; i++)<U+00A0> t2 = in(), dt[i] = t2-t1-1, t1 = t2;
      |         ^~~~~~~~
main.c:22:3: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; i < n; i++)<U+00A0> t2 = in(), dt[i] = t2-t1-1, t1 = t2;
      |                 ^~~~~~~~
main.c:22:4: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; i < n; i++)<U+00A0> t2 = in(), dt[i] = t2-t1-1, t1 = t2;
      |                         ^~~~~~~~
main.c:22:28: error: stray '\302' in program
   22 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; i < n; i++)<U+00A0> t2 = in(), dt[i] = t2-t1-1, t1 = t2;
      |                                                        ^~~~~~~~
main.c:23:1: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k == 1) { printf("%d\n", t2-t0+1); return 0; }
      | ^~~~~~~~
main.c:23:2: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k == 1) { printf("%d\n", t2-t0+1); return 0; }
      |         ^~~~~~~~
main.c:23:3: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k == 1) { printf("%d\n", t2-t0+1); return 0; }
      |                 ^~~~~~~~
main.c:23:4: error: stray '\302' in program
   23 | <U+00A0><U+00A0><U+00A0><U+00A0>if (k == 1) { printf("%d\n", t2-t0+1); return 0; }
      |                         ^~~~~~~~
main.c:24:1: error: stray '\302' in program
   24 | <U+00A0>
      | ^~~~~~~~
main.c:25:1: error: stray '\302' in program
   25 | <U+00A0><U+00A0><U+00A0><U+00A0>qsort(dt, n, sizeof(int), cmp);
      | ^~~~~~~~
main.c:25:2: error: stray '\302' in program
   25 | <U+00A0><U+00A0><U+00A0><U+00A0>qsort(dt, n, sizeof(int), cmp);
      |         ^~~~~~~~
main.c:25:3: error: stray '\302' in program
   25 | <U+00A0><U+00A0><U+00A0><U+00A0>qsort(dt, n, sizeof(int), cmp);
      |                 ^~~~~~~~
main.c:25:4: error: stray '\302' in program
   25 | <U+00A0><U+00A0><U+00A0><U+00A0>qsort(dt, n, sizeof(int), cmp);
      |                         ^~~~~~~~
main.c:25:31: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   25 |     qsort(dt, n, sizeof(int), cmp);
      |                               ^~~
      |                               |
      |                               int (*)(int *, int *)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(int *, int *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c:26:1: error: stray '\302' in program
   26 | <U+00A0>
      | ^~~~~~~~
main.c:27:1: error: stray '\302' in program
   27 | <U+00A0><U+00A0><U+00A0><U+00A0>s = 0, k--;
      | ^~~~~~~~
main.c:27:2: error: stray '\302' in program
   27 | <U+00A0><U+00A0><U+00A0><U+00A0>s = 0, k--;
      |         ^~~~~~~~
main.c:27:3: error: stray '\302' in program
   27 | <U+00A0><U+00A0><U+00A0><U+00A0>s = 0, k--;
      |                 ^~~~~~~~
main.c:27:4: error: stray '\302' in program
   27 | <U+00A0><U+00A0><U+00A0><U+00A0>s = 0, k--;
      |                         ^~~~~~~~
main.c:28:1: error: stray '\302' in program
   28 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; k--; i++) s += dt[i];
      | ^~~~~~~~
main.c:28:2: error: stray '\302' in program
   28 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; k--; i++) s += dt[i];
      |         ^~~~~~~~
main.c:28:3: error: stray '\302' in program
   28 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; k--; i++) s += dt[i];
      |                 ^~~~~~~~
main.c:28:4: error: stray '\302' in program
   28 | <U+00A0><U+00A0><U+00A0><U+00A0>for (i = 0; k--; i++) s += dt[i];
      |                         ^~~~~~~~
main.c:29:1: error: stray '\302' in program
   29 | <U+00A0><U+00A0><U+00A0><U+00A0>printf("%d\n", t2-t0+1-s);
      | ^~~~~~~~
main.c:29:2: error: stray '\302' in program
   29 | <U+00A0><U+00A0><U+00A0><U+00A0>printf("%d\n", t2-t0+1-s);
      |         ^~~~~~~~
main.c:29:3: error: stray '\302' in program
   29 | <U+00A0><U+00A0><U+00A0><U+00A0>printf("%d\n", t2-t0+1-s);
      |                 ^~~~~~~~
main.c:29:4: error: stray '\302' in program
   29 | <U+00A0><U+00A0><U+00A0><U+00A0>printf("%d\n", t2-t0+1-s);
      |                         ^~~~~~~~
main.c:30:1: error: stray '\302' in program
   30 | <U+00A0><U+00A0><U+00A0><U+00A0>return 0;
      | ^~~~~~~~
main.c:30:2: error: stray '\302' in program
   30 | <U+00A0><U+00A0><U+00A0><U+00A0>return 0;
      |         ^~~~~~~~
main.c:30:3: error: stray '\302' in program
   30 | <U+00A0><U+00A0><U+00A0><U+00A0>return 0;
      |                 ^~~~~~~~
main.c:30:4: error: stray '\302' in program
   30 | <U+00A0><U+00A0><U+00A0><U+00A0>return 0;
      |                         ^~~~~~~~