Submission #521806

# Submission time Handle Problem Language Result Execution time Memory
521806 2022-02-03T07:58:47 Z maks007 XOR Sum (info1cup17_xorsum) C++14
0 / 100
1600 ms 8268 KB
#include <bits/stdc++.h>
 
using namespace std;
 
int main(void) {
	int n;
	cin>> n;
	vector <int> a(n);
	vector <int> idx((int)1e6, 0);
	for(int i = 0; i < n; i ++ ) {
		cin >> a[i];
		idx[a[i]] ++;
	}
	sort(a.begin(), a.end());
	a.erase(unique(a.begin(), a.end()), a.end());
	int ans = 0;
	for(int i = 0; i < n; i ++) {
		for(int j = i; j < n; j ++) {
			if(idx[a[j]] % 2 == 1)
				ans ^= (a[i] + a[j]);
			else continue;
		}
	}
	cout << ans;
	return false;
}
# Verdict Execution time Memory Grader output
1 Runtime error 5 ms 8268 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1683 ms 8012 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1683 ms 8012 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 5 ms 8268 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 5 ms 8268 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -