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_39316027_4010.cpp: In function 'void init(int)':
0_0_39316027_4010.cpp:17:17: error: reference to 'distance' is ambiguous
   17 |                 distance[i] = INF;
      |                 ^~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_construct.h:62,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/char_traits.h:57,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:42,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39316027_4010.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp: In function 'void dijkstra(int)':
0_0_39316027_4010.cpp:39:9: error: 'dis' was not declared in this scope; did you mean 'vis'?
   39 |         dis[start] = 0;
      |         ^~~
      |         vis
0_0_39316027_4010.cpp:51:28: error: reference to 'distance' is ambiguous
   51 |                         if(distance[end] > dis[start] + weight)
      |                            ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp:53:33: error: reference to 'distance' is ambiguous
   53 |                                 distance[end] = distance[start] + weight;
      |                                 ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp:53:49: error: reference to 'distance' is ambiguous
   53 |                                 distance[end] = distance[start] + weight;
      |                                                 ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp:54:61: error: reference to 'distance' is ambiguous
   54 |                                 if(!vis[end] && minWeight > distance[end])
      |                                                             ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp:56:53: error: reference to 'distance' is ambiguous
   56 |                                         minWeight = distance[end];
      |                                                     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp:65:12: error: reference to 'distance' is ambiguous
   65 |         if(distance[end] == INF)
      |            ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~
0_0_39316027_4010.cpp:68:23: error: reference to 'distance' is ambiguous
   68 |                 cout<<distance[end]<<endl;
      |                       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_funcs.h:148:5: note: candidates are: 'template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)'
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
0_0_39316027_4010.cpp:11:5: note:                 'int distance [1005]'
   11 | int distance[MAXSIZE];
      |     ^~~~~~~~


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-23 05:17:51, Gzip enabled