Language: C++

#include <bits/stdc++.h>

#define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
#define fordown(i, r, l) for (register int i = (r), i##end = (int)(l); i >= i##end; --i)
#define rep(i, r) for (register int i = (0), i##end = (int)(r); i < i##end; ++i)
#define set(a, v) memset(a, v, sizeof(a))
#define cpy(a, b) memcpy(a, b, sizeof(a))
#define debug(x) cout << #x << ": " << (x) << endl

using namespace std;

template<typename t> inline bool chkmin(t &a, t b) { return b < a ? a = b, 1 : 0; }
template<typename t> inline bool chkmax(t &a, t b) { return b > a ? a = b, 1 : 0; }

inline int read() {
	int x(0), sgn(1); char ch(getchar());
	for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
	for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
	return x * sgn;
}

void file() {
#ifdef zjp_shadow
	freopen ("c.in", "r", stdin);
	freopen ("c.out", "w", stdout);
#endif
}

const int n = 2e5 + 1e3;

int n, a[n];

long long ans, pre, sum;

int main () {

	file();

	n = read();
	for (i, 1, n)
		sum += (a[i] = read());
	ans = 1e18;

	for (i, 1, n - 1)
		pre += a[i], chkmin(ans, abs(sum - 2 * pre));
	printf ("%lld\n", ans);

	return 0;

}

Compiler output:
a.cc:17:44: error: macro "for" requires 3 arguments, but only 1 given
   17 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                                            ^
a.cc:3:9: note: macro "for" defined here
    3 | #define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
      |         ^~~
a.cc:18:43: error: macro "for" requires 3 arguments, but only 1 given
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |                                           ^
a.cc:3:9: note: macro "for" defined here
    3 | #define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
      |         ^~~
a.cc: In function 'int read()':
a.cc:17:46: error: expected '(' before 'if'
   17 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                                              ^~
      |                                              (
a.cc:17:46: error: expected primary-expression before 'if'
   17 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                                              ^~
a.cc:18:9: error: expected primary-expression before 'for'
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |         ^~~
a.cc:17:70: error: expected ';' before 'for'
   17 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                                                                      ^
      |                                                                      ;
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |         ~~~                                                           
a.cc:18:9: error: expected primary-expression before 'for'
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |         ^~~
a.cc:17:70: error: expected ')' before 'for'
   17 |         for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1;
      |                                              ~~                      ^
      |                                                                      )
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |         ~~~                                                           
a.cc:18:45: error: expected '(' before 'x'
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |                                             ^
      |                                             (
a.cc:19:9: error: expected primary-expression before 'return'
   19 |         return x * sgn;
      |         ^~~~~~
a.cc:18:70: error: expected ';' before 'return'
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |                                                                      ^
      |                                                                      ;
   19 |         return x * sgn;
      |         ~~~~~~                                                        
a.cc:19:9: error: expected primary-expression before 'return'
   19 |         return x * sgn;
      |         ^~~~~~
a.cc:18:70: error: expected ')' before 'return'
   18 |         for (; isdigit(ch); ch = getchar()) x = (x * 10) + (ch ^ 48);
      |                                             ~                        ^
      |                                                                      )
   19 |         return x * sgn;
      |         ~~~~~~                                                        
a.cc: At global scope:
a.cc:31:5: error: conflicting declaration 'int n'
   31 | int n, a[n];
      |     ^
a.cc:29:11: note: previous declaration as 'const int n'
   29 | const int n = 2e5 + 1e3;
      |           ^
a.cc: In function 'int main()':
a.cc:39:11: error: assignment of read-only variable 'n'
   39 |         n = read();
      |         ~~^~~~~~~~
a.cc:40:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   40 |         for (i, 1, n)
      |              ^
a.cc:3:40: note: in definition of macro 'for'
    3 | #define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
      |                                        ^
a.cc:40:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   40 |         for (i, 1, n)
      |              ^
a.cc:3:49: note: in definition of macro 'for'
    3 | #define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
      |                                                 ^
a.cc:44:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   44 |         for (i, 1, n - 1)
      |              ^
a.cc:3:40: note: in definition of macro 'for'
    3 | #define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
      |                                        ^
a.cc:44:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   44 |         for (i, 1, n - 1)
      |              ^
a.cc:3:49: note: in definition of macro 'for'
    3 | #define for(i, l, r) for (register int i = (l), i##end = (int)(r); i <= i##end; ++i)
      |                                                 ^
a.cc: In function 'int read()':
a.cc:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^