Submission #992025

# Submission time Handle Problem Language Result Execution time Memory
992025 2024-06-03T15:24:42 Z ramalzaher XOR Sum (info1cup17_xorsum) C++14
0 / 100
856 ms 8420 KB
	#include <bits/stdc++.h>
	#define ll long long  
	#define sz size()
	#define pb push_back
	#define all(x) x.begin() , x.end()
	using namespace std;
	int main()
	{
		ll n; cin >> n ; ll a[n] ; 
		map<int,int> mp ;ll mx = -1 ;  
		for (int i = 0; i < n; i++)
		{
			cin >> a[i];  mp[a[i]] ++ ; 
			mx = max(mx , a[i] ); 
		}
		for(auto &it: mp ){
			it.second%=2 ; 
			}
			ll ans = 0 ; 
		for(int i = 0 ; i < 4005 ; i ++ ){
			for (int j = 0; j < 4005 ; j ++)
			{
				ans ^= (mp[j]*j + mp[i]*i) ;
			}
		}
		cout<<ans<<endl; 
	   return 0;
	}
# Verdict Execution time Memory Grader output
1 Incorrect 666 ms 1104 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 856 ms 8420 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 856 ms 8420 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 666 ms 1104 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 666 ms 1104 KB Output isn't correct
2 Halted 0 ms 0 KB -