Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<limits.h>
#define M LLONG_MAX
using namespace std;
long long int a[20000],x,y,zxy,min;
int main(void){
	int n,i,j;
	cin>>n;
	for(i=0;i<n;i++) cin>>a[i];
	min=M;
	for(i=1;i<n;i++){
		x=0;
		for(j=0;j<i;j++) x+=a[j];
		y=0;
		for(j=i;j<n;j++) y+=a[j];
		zxy=abs(x-y);
		if(min>zxy) min=zxy;
	}
	cout<<min<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: reference to 'min' is ambiguous
   12 |         min=M;
      |         ^~~
In file included from /usr/include/c++/14/string:51,
                 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:2:
/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:7:32: note:                 'long long int min'
    7 | long long int a[20000],x,y,zxy,min;
      |                                ^~~
a.cc:19:20: error: reference to 'min' is ambiguous
   19 |                 if(min>zxy) min=zxy;
      |                    ^~~
/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:7:32: note:                 'long long int min'
    7 | long long int a[20000],x,y,zxy,min;
      |                                ^~~
a.cc:19:29: error: reference to 'min' is ambiguous
   19 |                 if(min>zxy) min=zxy;
      |                             ^~~
/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:7:32: note:                 'long long int min'
    7 | long long int a[20000],x,y,zxy,min;
      |                                ^~~
a.cc:21:15: error: reference to 'min' is ambiguous
   21 |         cout<<min<<endl;
      |               ^~~
/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:7:32: note:                 'long long int min'
    7 | long long int a[20000],x,y,zxy,min;
      |                                ^~~