#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pl = pair<ll,ll>;
using tl = tuple<ll,ll,ll>;
using ld = long double;
#define all(x) (x).begin(),(x).end()
#define sz(x) ll((x).size())
#define pb emplace_back
#define F first
#define S second
const ll inf = (1ll<<60);
const ll N = 1e6 + 100;
const ll K = 3;
const ld PI = 3.141592653589793238462643383279;
//mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int a[N];
void solve(){
int n;
cin >> n;
int ans = 0;
for(ll i = 1;i<=n;i++){
cin >> a[i];
for(ll j = 1;j<=i;j++){
ans^=(a[i]+a[j]);
}
}
cout << ans;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll t = 1;
//cin >> t;
//cout << fixed << setprecision(20);
while(t--){
solve();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1693 ms |
900 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1693 ms |
900 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Correct |
562 ms |
684 KB |
Output is correct |
4 |
Correct |
568 ms |
1604 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
340 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Execution timed out |
1693 ms |
900 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |