Source Code
#include <bits/stdc++.h>
using namespace std;
int main() {
    int n;
    cin >> n;
    long long a = 0;
    for (int j = 0; j < 2; ++j) {
        for (int i = 0, x; i < n; ++i) {
            cin >> x;
            a += (j ? -x : x);    
        }
    }
    cout << a << '\n';
    return 0;
}
Copy
A Game of Darts Heartbeat
GNU G++17
87 ms
964 KB
Accepted