Submission #778255

#TimeUsernameProblemLanguageResultExecution timeMemory
778255vjudge1Deblo (COCI18_deblo)C++17
0 / 90
1088 ms7124 KiB
//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)

deblo.cpp: In function 'int32_t main()':
deblo.cpp:15:9: warning: unused variable 'c' [-Wunused-variable]
   15 |     int c=0;
      |         ^
#Verdict Execution timeMemoryGrader output
Fetching results...