Submission #646392

# Submission time Handle Problem Language Result Execution time Memory
646392 2022-09-29T17:58:03 Z murad_2005 XOR Sum (info1cup17_xorsum) C++14
7 / 100
1600 ms 12724 KB
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define ull unsigned long long
#define ui unsigned int
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define pf push_front
#define pii pair<int, int>
#define pil pair<int, ll>
#define plli pair<long long, int>
#define pdi pair<double, int>
#define pldldi pair<ld, pair<ld, int>>
#define pdd pair<double, double>
#define pid pair<int, double>
#define piii pair<int, pair<int, int>>
#define pllll pair<long long, long long>
#define pllllll pair<ll, pllll>
#define INF 2e9 + 5
#define size(v) v.size()
#define f first
#define s second
#define Pi 3.14159265359

using namespace std;

void solve(){
    int n;
    cin >> n;
    vector<ll>a(n);
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    ll Res = 0;
    for(int i = 0; i < n; i++){
        for(int j = i; j >= 0; j--){
            Res ^= (a[i] + a[j]);
        }
    }
    cout << Res;
}

int main(){

    int t;
    t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 8 ms 312 KB Output is correct
2 Correct 7 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1686 ms 12724 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1686 ms 12724 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 312 KB Output is correct
2 Correct 7 ms 364 KB Output is correct
3 Execution timed out 1676 ms 1968 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 312 KB Output is correct
2 Correct 7 ms 364 KB Output is correct
3 Execution timed out 1686 ms 12724 KB Time limit exceeded
4 Halted 0 ms 0 KB -