Submission #852020

# Submission time Handle Problem Language Result Execution time Memory
852020 2023-09-21T06:32:39 Z AtabayRajabli XOR Sum (info1cup17_xorsum) C++17
0 / 100
168 ms 8248 KB
#include <bits/stdc++.h>
#define endll '\n'
using namespace std;

signed main()
{
    long long n;
    cin >> n;

    vector<long long> a(n, 0);

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

    long long line = 0, orr = 0;
    for(int i = 0; i<n; i++)
    {
        line ^= a[i];
        orr |= (a[i] << 1);
    }

    cout << orr - line << endll;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 168 ms 8248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 168 ms 8248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -