F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_18882941_9371.cpp:4:15: error: reference to 'max' is ambiguous
 int n, m, map[max][max], wan[max][max];
               ^
0_0_18882941_9371.cpp:3:11: note: candidates are: const int max
 const int max = 1005, inf = 1 << 30;
           ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_18882941_9371.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
0_0_18882941_9371.cpp:4:20: error: reference to 'max' is ambiguous
 int n, m, map[max][max], wan[max][max];
                    ^
0_0_18882941_9371.cpp:3:11: note: candidates are: const int max
 const int max = 1005, inf = 1 << 30;
           ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_18882941_9371.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
0_0_18882941_9371.cpp:4:30: error: reference to 'max' is ambiguous
 int n, m, map[max][max], wan[max][max];
                              ^
0_0_18882941_9371.cpp:3:11: note: candidates are: const int max
 const int max = 1005, inf = 1 << 30;
           ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_18882941_9371.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
0_0_18882941_9371.cpp:4:35: error: reference to 'max' is ambiguous
 int n, m, map[max][max], wan[max][max];
                                   ^
0_0_18882941_9371.cpp:3:11: note: candidates are: const int max
 const int max = 1005, inf = 1 << 30;
           ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_18882941_9371.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
0_0_18882941_9371.cpp: In function 'void dfs(int, int, int, int)':
0_0_18882941_9371.cpp:18:49: error: 'map' was not declared in this scope
   if (1 <= nx && nx<= n && 1 <= ny &&ny<= m && (map[nx][ny] == map[ex][ey] || map[nx][ny] == 0))
                                                 ^
0_0_18882941_9371.cpp:22:5: error: 'wan' was not declared in this scope
     wan[nx][ny] = cnt;
     ^
0_0_18882941_9371.cpp:26:17: error: 'wan' was not declared in this scope
    if (cnt<2 && wan[nx][ny]>wan[x][y])
                 ^
0_0_18882941_9371.cpp: In function 'int main()':
0_0_18882941_9371.cpp:44:12: error: 'map' was not declared in this scope
     cin >> map[i][j];
            ^
0_0_18882941_9371.cpp:51:9: error: 'map' was not declared in this scope
    if ((map[sx][sy] == 0 || map[ex][ey] == 0) || (map[sx][sy] != map[ex][ey]))
         ^
0_0_18882941_9371.cpp:56:10: error: 'wan' was not declared in this scope
    fill(&wan[0][0], &wan[max][0], inf);
          ^
0_0_18882941_9371.cpp:56:26: error: reference to 'max' is ambiguous
    fill(&wan[0][0], &wan[max][0], inf);
                          ^
0_0_18882941_9371.cpp:3:11: note: candidates are: const int max
 const int max = 1005, inf = 1 << 30;
           ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_18882941_9371.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 16:24:02, Gzip enabled