Submission #521837

# Submission time Handle Problem Language Result Execution time Memory
521837 2022-02-03T09:28:33 Z iskhakkutbilim XOR Sum (info1cup17_xorsum) C++14
7 / 100
1600 ms 8032 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
const int INF = 1e9 + 7;
const int N = 1e5 + 1;


void solve(){
	
}

main(){
	int n; cin >> n;
	vector<int> a(n);
	multiset<int> st;
	for(int i = 0;i < n; i++){
		cin >> a[i];
	}
	int xr = 0;
	for(int i = 0;i < n; i++){
		for(int j = i;j < n; j++){
			xr^= (a[i] + a[j]);
			
			// cout << a[i] + a[j] << "\n";
		}
	}
	
	cout << xr;
	return 0;
}

Compilation message

xorsum.cpp:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   14 | main(){
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 8 ms 324 KB Output is correct
2 Correct 8 ms 300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1679 ms 8032 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1679 ms 8032 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 324 KB Output is correct
2 Correct 8 ms 300 KB Output is correct
3 Execution timed out 1621 ms 1488 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 324 KB Output is correct
2 Correct 8 ms 300 KB Output is correct
3 Execution timed out 1679 ms 8032 KB Time limit exceeded
4 Halted 0 ms 0 KB -