Language: C++

#include<bits/stdc++.h>
using namespace std;
int map[101][101];
int main(){
	int n,a;
	cin>>n;
	for(int i=0;i<=n;i++)map[i][0]=0;
	for(int j=0;j<=n;j++)map[0][j]=0;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			cin>>a;
			map[i][j]=map[i-1][j]+map[i][j-1]-map[i-1][j-1]+a;
		}
	}
	int ans=-1000000000;
	for(int i=0;i<n;i++){
		for(int is=i+1;is<=n;is++){
			for(int j=0;j<n;j++){
				for(int js=j+1;js<=n;js++){
					ans=max(ans,map[is][js]-map[is][j]-map[i][js]+map[i][j]);
				}
			}
		}
	}
	cout<<ans<<endl;
	getchar();
	getchar();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: reference to 'map' is ambiguous
    7 |         for(int i=0;i<=n;i++)map[i][0]=0;
      |                              ^~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:8:30: error: reference to 'map' is ambiguous
    8 |         for(int j=0;j<=n;j++)map[0][j]=0;
      |                              ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:12:25: error: reference to 'map' is ambiguous
   12 |                         map[i][j]=map[i-1][j]+map[i][j-1]-map[i-1][j-1]+a;
      |                         ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:12:35: error: reference to 'map' is ambiguous
   12 |                         map[i][j]=map[i-1][j]+map[i][j-1]-map[i-1][j-1]+a;
      |                                   ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:12:47: error: reference to 'map' is ambiguous
   12 |                         map[i][j]=map[i-1][j]+map[i][j-1]-map[i-1][j-1]+a;
      |                                               ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:12:59: error: reference to 'map' is ambiguous
   12 |                         map[i][j]=map[i-1][j]+map[i][j-1]-map[i-1][j-1]+a;
      |                                                           ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:20:53: error: reference to 'map' is ambiguous
   20 |                                         ans=max(ans,map[is][js]-map[is][j]-map[i][js]+map[i][j]);
      |                                                     ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:20:65: error: reference to 'map' is ambiguous
   20 |                                         ans=max(ans,map[is][js]-map[is][j]-map[i][js]+map[i][j]);
      |                                                                 ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:20:76: error: reference to 'map' is ambiguous
   20 |                                         ans=max(ans,map[is][js]-map[is][j]-map[i][js]+map[i][j]);
      |                                                                            ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~
a.cc:20:87: error: reference to 'map' is ambiguous
   20 |                                         ans=max(ans,map[is][js]-map[is][j]-map[i][js]+map[i][j]);
      |                                                                                       ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:3:5: note:                 'int map [101][101]'
    3 | int map[101][101];
      |     ^~~