Submission #778255

# Submission time Handle Problem Language Result Execution time Memory
778255 2023-07-10T07:54:08 Z vjudge1 Deblo (COCI18_deblo) C++17
0 / 90
1000 ms 7124 KB
//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

deblo.cpp: In function 'int32_t main()':
deblo.cpp:15:9: warning: unused variable 'c' [-Wunused-variable]
   15 |     int c=0;
      |         ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2644 KB Output isn't correct
2 Incorrect 1 ms 2644 KB Output isn't correct
3 Incorrect 1 ms 2644 KB Output isn't correct
4 Incorrect 2 ms 2712 KB Output isn't correct
5 Incorrect 2 ms 2644 KB Output isn't correct
6 Execution timed out 1084 ms 6444 KB Time limit exceeded
7 Execution timed out 1063 ms 6556 KB Time limit exceeded
8 Execution timed out 1088 ms 6996 KB Time limit exceeded
9 Execution timed out 1082 ms 6996 KB Time limit exceeded
10 Execution timed out 1084 ms 7124 KB Time limit exceeded