Language: C++

#include<cstdio>
#include<vector>
#define MOD 39989
#define MAXN 39990
using namespace std;
typedef __int64 LL;
LL a[5][220];
vector<LL> G[MAXN];
int n;
inline LL ABS(LL x) {
	return x > 0 ? x : -x;
}
inline void Insert(LL x) {
	int t;
	t = ABS(x) % MOD;
	G[t].push_back(x);
	//	printf("%lld ", x);
}
bool Find(LL x) {
	int t, i;
	//	printf("%lld ", x);
	t = ABS(x) % MOD;
	for (i = 0; i < G[t].size(); i++) {
		if (G[t][i] == x)
			return true;
	}
	return false;
}
bool OK() {
	int i, j, k;
	for (i = 0; i < n; i++) {
		for (j = 0; j < n; j++) {
			for (k = 0; k < n; k++) {
				if (Find(a[0][i] + a[2][j] + a[4][k]))
					return true;
			}
		}
	}
	return false;
}
int main() {
	int c, i, j;
	scanf("%d", &c);
	while (c--) {
		for (i = 0; i < MAXN; i++)
			G[i].clear();
		scanf("%d", &n);
		for (i = 0; i < 5; i++) {
			for (j = 0; j < n; j++)
				scanf("%I64d", &a[i][j]);
		}
		for (i = 0; i < n; i++) {
			for (j = 0; j < n; j++)
				Insert(-a[1][i] - a[3][j]);
		}
		//		putchar('\n');
		if (OK())
			puts("YES");
		else
			puts("NO");
	}
	return 0;
}

Compiler output:
a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    6 | typedef __int64 LL;
      |         ^~~~~~~
      |         __int64_t
a.cc:7:1: error: 'LL' does not name a type; did you mean 'NULL'?
    7 | LL a[5][220];
      | ^~
      | NULL
a.cc:8:8: error: 'LL' was not declared in this scope; did you mean 'NULL'?
    8 | vector<LL> G[MAXN];
      |        ^~
      |        NULL
a.cc:8:10: error: template argument 1 is invalid
    8 | vector<LL> G[MAXN];
      |          ^
a.cc:8:10: error: template argument 2 is invalid
a.cc:10:8: error: 'LL' does not name a type; did you mean 'NULL'?
   10 | inline LL ABS(LL x) {
      |        ^~
      |        NULL
a.cc:13:13: error: variable or field 'Insert' declared void
   13 | inline void Insert(LL x) {
      |             ^~~~~~
a.cc:13:20: error: 'LL' was not declared in this scope
   13 | inline void Insert(LL x) {
      |                    ^~
a.cc:19:11: error: 'LL' was not declared in this scope
   19 | bool Find(LL x) {
      |           ^~
a.cc: In function 'bool OK()':
a.cc:34:42: error: 'a' was not declared in this scope
   34 |                                 if (Find(a[0][i] + a[2][j] + a[4][k]))
      |                                          ^
a.cc:34:69: error: 'Find' cannot be used as a function
   34 |                                 if (Find(a[0][i] + a[2][j] + a[4][k]))
      |                                                                     ^
a.cc: In function 'int main()':
a.cc:46:30: error: request for member 'clear' in 'G[i]', which is of non-class type 'int'
   46 |                         G[i].clear();
      |                              ^~~~~
a.cc:50:49: error: 'a' was not declared in this scope
   50 |                                 scanf("%I64d", &a[i][j]);
      |                                                 ^
a.cc:54:41: error: 'a' was not declared in this scope
   54 |                                 Insert(-a[1][i] - a[3][j]);
      |                                         ^
a.cc:54:33: error: 'Insert' was not declared in this scope
   54 |                                 Insert(-a[1][i] - a[3][j]);
      |                                 ^~~~~~