Source Code
#include <iostream>
#include <algorithm>
#include <iterator>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
long long a[100001], b[100001];
int main() {
	int n;
	long long sum1, sum2;
	sum1 = sum2 = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		sum1 += a[i];
	}
	for (int i = 0; i < n; i++) {
		cin >> b[i];
		sum2 += b[i];
	}
	cout << sum1 - sum2;
	return 0;
}
Copy
A Game of Darts Sarah
GNU G++17
52 ms
2.3 MB
Accepted