Source Code
#include <bits/stdc++.h>

using namespace std;

int main() {
    //freopen("cubes.in", "r", stdin);
    //freopen ("output.txt","w",stdout);
    int t = 1;
    // cin >> t;
    for (int j = 0; j < t; j++) {
        int n;
        cin >> n;
        long long a = 0, b = 0;
        for(int i = 0; i < n; i++) {
            int x;
            cin >> x;
            a += x;
        }
        for(int i = 0; i < n; i++) {
            int x;
            cin >> x;
            b += x;
        }
        if(b == a) cout << 0;
        else cout << ((a > b)? 1 : -1);
    }
    return 0;
}
Copy
A Game of Darts Fattah
GNU G++17
0 ms
432 KB
Wrong Answer