Sponsors

Tag: problem: (C) Vladik and Memorable Trip Solve In C/C++

Codeforces Round #416 (Div....

#include<cstdlib> #include<cstring> #include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main(){ int n,a,c,f; scanf("%d",&n); for(int i=0;i<n;i++)scanf("%d",a+i),c]++; for(int i=0;i<n;i++){ int v={0},temp=0,xo=0; for(int j=i;j>=0;j--){ if(v]==0)v]=1,temp+=c],xo^=a; f=max(f,f+(--temp?0:xo)); } } printf("%d",f); return...

Advertisement

spot_img