# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
778255 | vjudge1 | Deblo (COCI18_deblo) | C++17 | 1088 ms | 7124 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//subtask
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);
#define OYY 1000000005
#define mod 998244353
#define mid (start+end)/2
int dizi[100005],n,cev=0;
vector <int> v[100005];
int32_t main(){
faster
cin>>n;
int c=0;
for(int i=1;i<=n;i++){
cin>>dizi[i];
}
for(int i=1;i<n;i++){
int a,b;
cin>>a>>b;
v[a].push_back(b);
v[b].push_back(a);
}
for(int i=1;i<=n;i++){
int cur=0;
for(int j=i;j<=n;j++){
cur^=dizi[j];
cev+=cur;
//cout<<cev<</*" "<<cur<<*/endl;
}
}
cout<<cev<<'\n';
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |