Submission #518292

# Submission time Handle Problem Language Result Execution time Memory
518292 2022-01-23T10:34:08 Z lucri XOR Sum (info1cup17_xorsum) C++17
0 / 100
1600 ms 772 KB
#include <iostream>
using namespace std;
long long n,x,ans;
bool f[1000010];
int main()
{
    cin>>n;
    for(int i=1;i<=n;++i)
    {
        cin>>x;
        if(f[x]==false)
            f[x]=true;
        else
        {
            f[x]=false;
            ans=ans^(x+x);
        }
    }
    for(int i=1;i<=1000000;++i)
        if(f[i]==true)
            for(int j=i;j<=1000000;++j)
            {
                if(f[j]==true)
                    ans=ans^(i+j);
            }
    cout<<ans;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 440 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1611 ms 772 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1611 ms 772 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 440 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 440 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -