Submission #497065

# Submission time Handle Problem Language Result Execution time Memory
497065 2021-12-22T09:46:36 Z AQ0212 XOR Sum (info1cup17_xorsum) C++17
45 / 100
1100 ms 2060 KB
#include <iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <sstream>
#include <cstring>

#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse,-fgcse-lm")
#pragma GCC optimize("-ftree-pre,-ftree-vrp")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")

#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 4 ms 332 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 2060 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 2060 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 332 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 1100 ms 1464 KB Output is correct
4 Correct 985 ms 2012 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 332 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Runtime error 8 ms 2060 KB Execution killed with signal 11
4 Halted 0 ms 0 KB -