Source Code
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
	int n, t;
	cin >> t;
	long bi, tmp;
	long ai[200001];
	while (t--)
	{
		tmp = 0;
		cin >> n;
		for (int i = 0; i < n; i++)
		{
			cin >> ai[i];
		}
		for (int i = 0; i < n; i++)
		{
			cin >> bi;
			if (tmp < abs(bi - ai[i]))
				tmp = abs(bi - ai[i]);
		}
		cout << tmp << endl;
	}
	return 0;
}
Copy
Garden Walls master2000
GNU G++17
127 ms
1.8 MB
Wrong Answer