Language: C++

#include<iostream>
#include<cmath>
using namespace std;
const long long size=2e+5;
	long long a[size],b[size];
	long long n,s,min=2e+10,result;
int main()
{
	
	cin>>n>>a[0];
     b[0]=a[0];
	 s=a[0]; 
	for(int i=1;i<n;i++)
	{
		cin>>a[i];
	    b[i]=b[i-1]+a[i];
	    s+=a[i];
	}
	for(int i=0;i<n-1;i++)
	{
	result=abs(2*x[i]-s);
	if(min>result)
	min=result;
	}
	cout<<min;
	return 0;	
 } 

Compiler output:
a.cc:5:21: error: reference to 'size' is ambiguous
    5 |         long long a[size],b[size];
      |                     ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:4:17: note:                 'const long long int size'
    4 | const long long size=2e+5;
      |                 ^~~~
a.cc:5:29: error: reference to 'size' is ambiguous
    5 |         long long a[size],b[size];
      |                             ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:4:17: note:                 'const long long int size'
    4 | const long long size=2e+5;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:10:17: error: 'a' was not declared in this scope
   10 |         cin>>n>>a[0];
      |                 ^
a.cc:11:6: error: 'b' was not declared in this scope
   11 |      b[0]=a[0];
      |      ^
a.cc:21:22: error: 'x' was not declared in this scope
   21 |         result=abs(2*x[i]-s);
      |                      ^
a.cc:22:12: error: reference to 'min' is ambiguous
   22 |         if(min>result)
      |            ^~~
In file included from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:                 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:23: note:                 'long long int min'
    6 |         long long n,s,min=2e+10,result;
      |                       ^~~
a.cc:23:9: error: reference to 'min' is ambiguous
   23 |         min=result;
      |         ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:                 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:23: note:                 'long long int min'
    6 |         long long n,s,min=2e+10,result;
      |                       ^~~
a.cc:25:15: error: reference to 'min' is ambiguous
   25 |         cout<<min;
      |               ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:                 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:6:23: note:                 'long long int min'
    6 |         long long n,s,min=2e+10,result;
      |                       ^~~