답안 #496720

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
496720 2021-12-22T03:23:22 Z Mukhitali XOR Sum (info1cup17_xorsum) C++17
7 / 100
1600 ms 580 KB
//bit chass 1
#include <bits/stdc++.h>

#define x first
#define y second
#define el "\n"
#define ll long long
#define pb push_back
#define pll pair <ll, ll>
#define pii pair <int, int>
#define all(x) x.begin(), x.end()
#define lcm(x,y) x * y / __gcd(x, y)
#define ibase ios_base::sync_with_stdio(0), cin.tie(0)

using namespace std;

const int N = 3e5 + 5, inf = 1e9 + 7, M = 2e6, MM = 2e6 + 5, K = 300;
const ll MI = 2e18;
const double P = 3.14;

//string s[505];
//string a;
//int r, c, m;
//int ans;
int a[N];

void solve() {
	int n;
	cin >> n;
//	vector <int> v;
	ll ans = 0;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		for (int j = 1; j <= i; j++)
			ans ^= a[i] + a[j];
	}
	cout << ans;
	
}

int main() {
	ibase;
	int T = 1;
//	cin >> T;
	for (int i = 1; i <= T; i++) {
//		cout << "Case " << i << ": ";
		solve();
		cout << el;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 332 KB Output is correct
2 Correct 7 ms 328 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1678 ms 576 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1678 ms 576 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 332 KB Output is correct
2 Correct 7 ms 328 KB Output is correct
3 Execution timed out 1690 ms 580 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 332 KB Output is correct
2 Correct 7 ms 328 KB Output is correct
3 Execution timed out 1678 ms 576 KB Time limit exceeded
4 Halted 0 ms 0 KB -