Submission #496848

# Submission time Handle Problem Language Result Execution time Memory
496848 2021-12-22T05:23:25 Z AQ0212 XOR Sum (info1cup17_xorsum) C++17
7 / 100
1600 ms 2620 KB
#include <iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <sstream>
#include <cstring>

#define ll long long int
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define all(x) x.begin(), x.end()

using namespace std;

ll ans, a[ 100111 ];

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    ll n;

    cin >> n;

    for(int i = 1; i <= n; i ++){
        cin >> a[ i ];
    }

    for(int i = 1; i <= n; i ++){
        for(int j = i; j <= n; j ++){
            ans ^= (a[ i ] + a[ j ]);
        }
    }

    cout << ans;
}


# Verdict Execution time Memory Grader output
1 Correct 5 ms 332 KB Output is correct
2 Correct 6 ms 328 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 2620 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 2620 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 332 KB Output is correct
2 Correct 6 ms 328 KB Output is correct
3 Execution timed out 1632 ms 1896 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 332 KB Output is correct
2 Correct 6 ms 328 KB Output is correct
3 Runtime error 8 ms 2620 KB Execution killed with signal 11
4 Halted 0 ms 0 KB -