/*
Bismillahir rahmanir rahim
Allahu akbar
Alhamdulillah
Subhanallah
Rabbi a’inni wa-la tu’in ‘alayya,
wa-nsurni wa-la tansur ‘alayya,
wa-mkur-li wa-la tamkur alayya,
wa-hdini wa-yassir-il-huda ilayya,
wa-nsurni ‘ala man bagha ‘alayya
Ya Hayyu Ya Qayyum,
birahmatika astaghitsu,
aslih li sha'ni kullahu,
wa la takilni ila nafsi tarfata ‘aini
*/
#include <bits/stdc++.h>
#define ll long long
#define int long long
#define pb(x) push_back(x)
#define sor(x) sort(x.begin(), x.end())
#define rsor(x) sort(x.rbegin(), x.rend())
#define yes cout << "YES\n";
#define no cout << "NO\n";
#pragma pack(1)
using namespace std;
const int N = 2e5 + 55;
const int MOD = 1e9 + 7;
const bool T = false;
ll bp(ll a, ll n)
{
if(n == 0)
{
return 1;
}
if (n & 1)
{
return bp(a, n - 1) * a % MOD;
}
else
{
ll temp = bp(a, n / 2);
return temp * temp % MOD;
}
}
vector<ll> g[N];
bool used[N];
vector<ll> path;
ll x = -1;
void dfs(ll i, ll p)
{
if(x != -1)
{
return;
}
used[i] = 1;
path.pb(i);
for (auto now : g[i])
{
if(now == p)
{
continue;
}
if(x != -1)
{
return;
}
if(used[now])
{
path.pb(now);
x = now;
return;
}
if(!used[now])
{
dfs(now, i);
}
}
if(x == -1)
{
path.pop_back();
}
}
void hippopotomonstrosesquipedaliophobia()
{
ll n;
cin >> n;
vector<ll> vc;
for (int i = 0; i < n; i++)
{
ll x;
cin >> x;
vc.pb(x);
}
ll gcc = 0;
for (int i = 0; i < n; i++)
{
for (int j = i; j < n; j++)
{
gcc ^= vc[i] + vc[j];
}
}
cout << gcc << '\n';
}
signed main(void)
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int time = 1;
if (T)
{
cin >> time;
}
while (time--)
{
hippopotomonstrosesquipedaliophobia();
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |