Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <utility>
typedef long long ll;
ll MOD = 1e9+7;

using namespace std;

ll a[200000];
ll g[200001];//1+2+...+n
ll sum[200001];//i未満の累積和
ll xor[200001];//i未満のxor
ll sa[200001];//累積和の差分
ll oo[200001];//xorのxor

int main()
{
	int n;
	ll ans=0;
	
	cin>>n;
	sum[0]=0;
	xor[0]=0;
	g[0]=0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		g[i+1]=g[i]+(i+1);
		sum[i+1]=sum[i]+a[i];
		ll d=(xor[i]^a[i]);
		xor[i+1]=d;
	}
	/*
	for(int i=2;i<n+1;i++)
	{
		sa[i-1]=sum[i]-sum[i-1];
		ll d=(xor[i]^xor[i-1]);
		oo[i-1]=d;
	}
	/*
	/*
	for(int i=1;i<n;i++)
	{
		cerr<<sa[i]<<" ";
	}
	cerr<<endl;
	for(int i=1;i<n;i++)
	{
		cerr<<oo[i]<<" ";
	}
	cerr<<endl;
	*/

	for(int i=0;i<n;i++)
	{
		for(int j=i;j<n;j++)
		{
			ll ss=sum[j+1]-sum[i];
			ll xx=(xor[j+1]^xor[i]);
			if(ss==xx)
				ans++;
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:15:4: error: expected unqualified-id before 'xor' token
   15 | ll xor[200001];//i未満のxor
      |    ^~~
a.cc: In function 'int main()':
a.cc:26:9: error: expected primary-expression before 'xor' token
   26 |         xor[0]=0;
      |         ^~~
a.cc:26:13: error: expected identifier before numeric constant
   26 |         xor[0]=0;
      |             ^
a.cc: In lambda function:
a.cc:26:15: error: expected '{' before '=' token
   26 |         xor[0]=0;
      |               ^
a.cc: In function 'int main()':
a.cc:33:23: error: expected primary-expression before 'xor' token
   33 |                 ll d=(xor[i]^a[i]);
      |                       ^~~
a.cc: In lambda function:
a.cc:33:29: error: expected '{' before '^' token
   33 |                 ll d=(xor[i]^a[i]);
      |                             ^
a.cc: In function 'int main()':
a.cc:34:17: error: expected primary-expression before 'xor' token
   34 |                 xor[i+1]=d;
      |                 ^~~
a.cc:34:22: error: expected ',' before '+' token
   34 |                 xor[i+1]=d;
      |                      ^
      |                      ,
a.cc:34:22: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:34:25: error: expected '{' before '=' token
   34 |                 xor[i+1]=d;
      |                         ^
a.cc: In function 'int main()':
a.cc:62:32: error: expected primary-expression before 'xor' token
   62 |                         ll xx=(xor[j+1]^xor[i]);
      |                                ^~~
a.cc:62:37: error: expected ',' before '+' token
   62 |                         ll xx=(xor[j+1]^xor[i]);
      |                                     ^
      |                                     ,
a.cc:62:37: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:62:40: error: expected '{' before '^' token
   62 |                         ll xx=(xor[j+1]^xor[i]);
      |                                        ^
a.cc: In function 'int main()':
a.cc:62:41: error: expected primary-expression before 'xor' token
   62 |                         ll xx=(xor[j+1]^xor[i]);
      |                                         ^~~
a.cc: In lambda function:
a.cc:62:47: error: expected '{' before ')' token
   62 |                         ll xx=(xor[j+1]^xor[i]);
      |                                               ^